feat: make logo link to the homepage of the app, rename login btn to connect, remove html entities from post excerpt

This commit is contained in:
MTG2000
2022-07-21 08:15:31 +03:00
parent 7cc990e4e8
commit ec5f81c286
4 changed files with 14 additions and 10 deletions

View File

@@ -373,7 +373,13 @@ const createStory = extendType({
// Preprocess & insert
const htmlBody = marked.parse(body);
const excerpt = htmlBody.replace(/<[^>]+>/g, '').slice(0, 120);
const excerpt = htmlBody
.replace(/<[^>]+>/g, '')
.slice(0, 120)
.replace(/&amp;/g, "&")
.replace(/&#39;/g, "'")
.replace(/&quot;/g, '"')
;
if (id) {
await prisma.story.update({