jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389988 )

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(-)

Approvals:
  Mglaser: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 8362b07..9df13f2 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -818,8 +818,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/);
@@ -2320,8 +2320,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/389988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I638e74dcbd7368ddb6dcf13841dad34b53ee9e94
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to