Mglaser has uploaded a new change for review. https://gerrit.wikimedia.org/r/255478
Change subject: Improved "images in table" handling ...................................................................... Improved "images in table" handling 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 Change-Id: I9774710fc5b150aa1faa915c543bdd71ee87ed10 --- M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/78/255478/1 diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js index dd7e88d..67dfb1e 100644 --- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js +++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js @@ -752,6 +752,13 @@ // in first pass, some double empty lines remain, therefore, a second pass is necessary text = text.replace(/\n\n/gmi, "\n@@blindline@@\n"); text = text.replace(/\n\n/gmi, "\n@@blindline@@\n"); + + // 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"); + } + lines = text.split(/\n/); for (var i = 0; i < lines.length; i++) { @@ -931,6 +938,7 @@ text = lines.join("\n"); text = text.replace(/@@blindline@@/gmi, ''); + text = text.replace(/@@pipe@@/gmi, '|'); return text; } -- To view, visit https://gerrit.wikimedia.org/r/255478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9774710fc5b150aa1faa915c543bdd71ee87ed10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Mglaser <gla...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits