feat: sanitize short description
This commit is contained in:
parent
89fdda0122
commit
bac94738fd
2 changed files with 6 additions and 1 deletions
|
@ -55,6 +55,11 @@ export default class DelegateController {
|
|||
proposedVersion.contacts.peoples = proposedVersion.contacts.peoples.filter((p: any) => !p.isResponsable)
|
||||
}
|
||||
|
||||
// sanitize short description
|
||||
if (Utils.isStrUsable(proposedVersion.shortDescription)) {
|
||||
proposedVersion.shortDescription = proposedVersion.shortDescription.replace(/\n/g, '')
|
||||
}
|
||||
|
||||
// sanitize long description
|
||||
if (Utils.isStrUsable(proposedVersion.descriptionLong)) {
|
||||
proposedVersion.descriptionLong = proposedVersion.descriptionLong.replace(/\n/g, '')
|
||||
|
|
|
@ -51,7 +51,7 @@ export default class PublicController {
|
|||
return {
|
||||
_id: o._id,
|
||||
name: version.name,
|
||||
description: version.descriptionShort,
|
||||
description: version.descriptionShort.replace(/\n/g, ''),
|
||||
thumbnail: version.thumbnail.key,
|
||||
tags: version.tags === null ? 'tags_not_found' : version.tags,
|
||||
slug: o.get('slugs')[o.get('slugs').length -1]
|
||||
|
|
Loading…
Reference in a new issue