jenkins-bot has submitted this change and it was merged. (
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(-)
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 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: merged
Gerrit-Change-Id: I638e74dcbd7368ddb6dcf13841dad34b53ee9e94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: 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