ItSpiderman has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/367887 )
Change subject: VisualEditor: Fix for <> in tables
......................................................................
VisualEditor: Fix for <> in tables
Using < and > in tables caused corrupted code
Please see ERM ticket for more info
ERM: #7033
Needs cherry-picking to REL1_27 and REL1_23
Change-Id: Ibb3599ab646f21c779ff818d7d14ff55ca05da79
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 5 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/87/367887/1
diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 78c55a2..8451a85 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -786,6 +786,7 @@
inTh = false,
start = 0,
nestLevel = 0;
+
// there is an IE bug with split: split(\n) will not produce an
extra element with \n\n.
// therefore, some blindtext is inserted which is removed at
the end of this section
// in first pass, some double empty lines remain, therefore, a
second pass is necessary
@@ -794,8 +795,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/);
@@ -2297,8 +2298,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/367887
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb3599ab646f21c779ff818d7d14ff55ca05da79
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: ItSpiderman <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits