From 7602fb7dd377624213a74ce37472d34f38f8fd89 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Mon, 10 Aug 2020 14:48:34 +0200 Subject: [PATCH] fix(PublicPage): escape " which cause JSON parsing error in home page --- src/controllers/PublicController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/PublicController.ts b/src/controllers/PublicController.ts index 061debc..47a8fa4 100644 --- a/src/controllers/PublicController.ts +++ b/src/controllers/PublicController.ts @@ -51,7 +51,7 @@ export default class PublicController { return { _id: o._id, name: version.name, - description: version.descriptionShort.replace(/\n/g, ' '), + description: version.descriptionShort.replace(/\n/g, ' ').replace(/\"/g, '\\"'), thumbnail: version.thumbnail.key, tags: version.tags === null ? 'tags_not_found' : version.tags, slug: o.get('slugs')[o.get('slugs').length -1]