From baa6826409aebae93063af0dde95c96733f9d94f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 9 Feb 2016 15:07:39 +0000 Subject: [PATCH] better commenting --- src/HtmlUtils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index 603f595951..87f5bd2cca 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -22,8 +22,9 @@ var highlight = require('highlight.js'); var sanitizeHtmlParams = { allowedTags: [ - 'font', // custom to matrix. deliberately no h1/h2 to stop people shouting. + 'font', // custom to matrix for IRC-style font coloring 'del', // for markdown + // deliberately no h1/h2 to stop people shouting. 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre' @@ -65,7 +66,7 @@ class Highlighter { // but we're attempting to apply the highlights here to the HTML body. This is // never going to end well - we really should be hooking into the sanitzer HTML // parser to only attempt to highlight text nodes to avoid corrupting tags. - // If and when this happens, we'll probably have to split his method in two between + // If and when this happens, we'll probably have to split this method in two between // HTML and plain-text highlighting. var safeHighlight = this.html ? sanitizeHtml(highlights[0], sanitizeHtmlParams) : highlights[0];