From 4bcebf5bbf850ebc49cdfb28f17d41172cb22b88 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 4 Apr 2013 14:24:21 +0100 Subject: [PATCH] Fix HTML element parser to not pass capturing parenthesis in terminating regexp --- core/modules/parsers/wikiparser/rules/html.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/html.js b/core/modules/parsers/wikiparser/rules/html.js index df9f22e6b..226c762bf 100644 --- a/core/modules/parsers/wikiparser/rules/html.js +++ b/core/modules/parsers/wikiparser/rules/html.js @@ -70,8 +70,8 @@ exports.parse = function() { } // Process the end tag if(!isSelfClosing && $tw.config.htmlVoidElements.indexOf(tagName) === -1) { - var reEndString = "()", - reEnd = new RegExp(reEndString,"mg"), + var reEndString = "", + reEnd = new RegExp("(" + reEndString + ")","mg"), content; if(hasLineBreak) { content = this.parser.parseBlocks(reEndString);