Subramanya Sastry has uploaded a new change for review.
https://gerrit.wikimedia.org/r/63827
Change subject: Fix non-terminating regexp in roundtrip-test.js from 553d6a4c
......................................................................
Fix non-terminating regexp in roundtrip-test.js from 553d6a4c
* Commit 553d6a4c fixed normalization by introducing this
regexp snippet: (?: [^>]+)*
* This particular pattern (..+)* has been responsible for several
instances of non-terminating regexps in Parsoid. See fixes made
in the following commits.
* Commit 9d53f31b
* Commit 76e57710
* Commit b6a6b1f7
During development, we also ran into this pattern couple other
times which didn't make it into comitted code but was discussed
on IRC.
* We should be careful when reviewing regexps to catch this pattern
before it becomes a problem.
* With this fix, "node roundtrip-test.js --prefix ru City_and_Colour"
runs to completion.
Change-Id: Ic6ab8ddeb6aaec7fcb36488163a129519cda2376
---
M js/lib/mediawiki.Util.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/27/63827/1
diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 35d583d..7d93284 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -1019,7 +1019,7 @@
// ignore troublesome attributes
out = out.
// remove <span typeof="....">....</span>
- replace(/<span(?: [^>]+)*
typeof="mw:(?:Placeholder|Nowiki|Object\/Template|Entity)"(?:
[^\0-\cZ\s\"\'>\/=]+(?:="[^"]*")?)*>((?:[^<]+|(?!<\/span).)*)<\/span>/g, '$1').
+ replace(/<span(?:[^>]*)
typeof="mw:(?:Placeholder|Nowiki|Object\/Template|Entity)"(?:
[^\0-\cZ\s\"\'>\/=]+(?:="[^"]*")?)*>((?:[^<]+|(?!<\/span).)*)<\/span>/g, '$1').
replace(/
(data-mw|data-parsoid|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|title|class)="[^\"]*"/g,
'');
} else {
out = out.
--
To view, visit https://gerrit.wikimedia.org/r/63827
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6ab8ddeb6aaec7fcb36488163a129519cda2376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits