Mglaser has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404775 )
Change subject: VisualEditor: Fix for <> in tables - commit 2 ...................................................................... VisualEditor: Fix for <> in tables - commit 2 Using < and > in tables caused corrupted code Please see ERM ticket for more info ERM: #7033 Needs cherry-picking to REL1_23 Change-Id: I638e74dcbd7368ddb6dcf13841dad34b53ee9e94 --- M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/75/404775/1 diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js index 5ec482a..c84ac9e 100644 --- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js +++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js @@ -778,8 +778,8 @@ // images or links in tables may contain | in their attributes, esp. in bs-data-*. These // need to be properly escaped in order not to interfere with table syntax - while (text.match(/(\<[^\>]*?)(\|)([^\>]*?\>)/g)) { - text = text.replace(/(\<[^\>]*?)(\|)([^\>]*?\>)/g, "$1@@pipe@@$3"); + while (text.match(/(\<[^\>]*?)(\"[^\>\"]*?)(\|)([^\>\"]*\")([^\>]*?\>)/g)) { + text = text.replace(/(\<[^\>]*?)(\"[^\>\"]*?)(\|)([^\>\"]*\")([^\>]*?\>)/g, "$1$2@@pipe@@$4$5"); } lines = text.split(/\n/); @@ -2265,8 +2265,8 @@ //special tags before pres prevents spaces in special tags like GeSHi to take effect text = _preserveSpecialTags(text); - //cleanup linebreaks in tags except comments - text = text.replace(/(<[^!][^>]+?)(\n)([^<]+?>)/gi, "$1$3"); + //cleanup linebreaks in tags except comments and tables + text = text.replace(/(<[^!][^>]+?)(\n)([^<|]+?>)/gi, "$1$3"); //preserve entities that were orignially html entities text = text.replace(/(&[^\s;]+;)/gmi, '<span class="bs_htmlentity">$1</span>'); -- To view, visit https://gerrit.wikimedia.org/r/404775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I638e74dcbd7368ddb6dcf13841dad34b53ee9e94 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: REL1_23 Gerrit-Owner: Mglaser <gla...@hallowelt.biz> Gerrit-Reviewer: ItSpiderman <d.savulje...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits