diff options
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/src/services/NewComment.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/comments/src/services/NewComment.js b/apps/comments/src/services/NewComment.js index eaf08cc10b9..27d227ed656 100644 --- a/apps/comments/src/services/NewComment.js +++ b/apps/comments/src/services/NewComment.js @@ -22,6 +22,7 @@ import { getCurrentUser } from '@nextcloud/auth' import { getRootPath } from '../utils/davUtils' +import { decodeHtmlEntities } from '../utils/decodeHtmlEntities' import axios from '@nextcloud/axios' import client from './DavClient' @@ -55,5 +56,12 @@ export default async function(commentsType, ressourceId, message) { details: true, }) + const props = comment.data.props + // Decode twice to handle potentially double-encoded entities + // FIXME Remove this once https://github.com/nextcloud/server/issues/29306 + // is resolved + props.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2) + props.message = decodeHtmlEntities(props.message, 2) + return comment.data } |