fix(PublicPage): escape " which cause JSON parsing error in home page

This commit is contained in:
Matthieu Bessat 2020-08-10 14:48:34 +02:00
parent bea0b0e24e
commit 7602fb7dd3

View file

@ -51,7 +51,7 @@ export default class PublicController {
return { return {
_id: o._id, _id: o._id,
name: version.name, name: version.name,
description: version.descriptionShort.replace(/\n/g, ' '), description: version.descriptionShort.replace(/\n/g, ' ').replace(/\"/g, '\\"'),
thumbnail: version.thumbnail.key, thumbnail: version.thumbnail.key,
tags: version.tags === null ? 'tags_not_found' : version.tags, tags: version.tags === null ? 'tags_not_found' : version.tags,
slug: o.get('slugs')[o.get('slugs').length -1] slug: o.get('slugs')[o.get('slugs').length -1]