Node.js based forum software built for the modern web
#6272 strip all tags
Barış Soner Uşaklıcf087b607077
diff --git a/public/src/utils.js b/public/src/utils.jsindex d921573f7a..77c90c4fd9 100644--- a/public/src/utils.js+++ b/public/src/utils.js@@ -518,7 +518,15 @@}},- tags: ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'],+ tags: ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont',+ 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',+ 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'embed',+ 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',+ 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',+ 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option',+ 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select',+ 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot',+ 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'],stripTags: ['abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'base', 'basefont','bdi', 'bdo', 'big', 'blink', 'body', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',diff --git a/src/routes/feeds.js b/src/routes/feeds.jsindex ccb5af1d76..a60b3b4f3d 100644--- a/src/routes/feeds.js+++ b/src/routes/feeds.js@@ -106,7 +106,7 @@ function generateForTopic(req, res, callback) {var author = topicData.posts.length ? topicData.posts[0].username : '';var feed = new rss({- title: utils.stripHTMLTags(topicData.title, utils.stripTags),+ title: utils.stripHTMLTags(topicData.title, utils.tags),description: description,feed_url: nconf.get('url') + '/topic/' + tid + '.rss',site_url: nconf.get('url') + '/topic/' + topicData.slug,@@ -125,7 +125,7 @@ function generateForTopic(req, res, callback) {dateStamp = new Date(parseInt(parseInt(postData.edited, 10) === 0 ? postData.timestamp : postData.edited, 10)).toUTCString();feed.item({- title: 'Reply to ' + utils.stripHTMLTags(topicData.title, utils.stripTags) + ' on ' + dateStamp,+ title: 'Reply to ' + utils.stripHTMLTags(topicData.title, utils.tags) + ' on ' + dateStamp,description: postData.content,url: nconf.get('url') + '/post/' + postData.pid,author: postData.user ? postData.user.username : '',@@ -301,7 +301,7 @@ function generateTopicsFeed(feedOptions, feedTopics, callback) {async.each(feedTopics, function (topicData, next) {var feedItem = {- title: utils.stripHTMLTags(topicData.title, utils.stripTags),+ title: utils.stripHTMLTags(topicData.title, utils.tags),url: nconf.get('url') + '/topic/' + topicData.slug,date: new Date(parseInt(topicData.lastposttime, 10)).toUTCString(),};