diff options
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/helpers/view_helper.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js index bb909cea..22ab1324 100644 --- a/web-ui/app/js/helpers/view_helper.js +++ b/web-ui/app/js/helpers/view_helper.js @@ -35,30 +35,30 @@ define( return textPlainBody.replace(/^(.*?)$/mg, '<p>$1</p>'); } - function escapeHtmlTags (body) { + function escapeHtmlTags(body) { var escapeIndex = { - "&": "&", - "<": "<", - ">": ">", + '&': '&', + '<': '<', + '>': '>', '"': '"', - "'":''', - "/": '/' + '\'':''', + '/': '/' }; return body.replace(/["'<>\/&]/g, function(char){ return escapeIndex[char]; - } ) + }); } - function escapeHtmlAndAddParagraphs (body) { + function escapeHtmlAndAddParagraphs(body) { var escapedBody = escapeHtmlTags(body); return addParagraphsToPlainText(escapedBody); } - function formatMailBody (mail) { + function formatMailBody(mail) { var body = mail.htmlBodyPart ? htmlWhitelister.sanitize(mail.htmlBody, htmlWhitelister.tagPolicy) : escapeHtmlAndAddParagraphs(mail.textPlainBody); |