summaryrefslogtreecommitdiff
path: root/web-ui/app/js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js')
-rw-r--r--web-ui/app/js/helpers/view_helper.js18
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 = {
- "&": "&amp;",
- "<": "&lt;",
- ">": "&gt;",
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
'"': '&quot;',
- "'":'&#39;',
- "/": '&#x2f;'
+ '\'':'&#39;',
+ '/': '&#x2f;'
};
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);