jenkins-bot has submitted this change and it was merged.

Change subject: Prevent sanitizer from crashing: Followup on faa2bde47
......................................................................


Prevent sanitizer from crashing: Followup on faa2bde47

Assertion in getWTSource is triggering in some scenarios.
This patch prevents that -- the actual assertion failure needs
a separate investigation.

Change-Id: I379a22c647b62a737557b4d0d201d2875e3cd740
---
M lib/ext.core.Sanitizer.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ext.core.Sanitizer.js b/lib/ext.core.Sanitizer.js
index 08e952b..f30c1eb 100644
--- a/lib/ext.core.Sanitizer.js
+++ b/lib/ext.core.Sanitizer.js
@@ -711,7 +711,7 @@
        ) { // unknown tag -- convert to plain text
                var origToken = token;
 
-               if (!this.options.inTemplate) {
+               if (!this.options.inTemplate && token.dataAttribs.tsr) {
                        // Just get the original token source, so that we can 
avoid
                        // whitespace differences.
                        token = token.getWTSource(this.manager.env);

-- 
To view, visit https://gerrit.wikimedia.org/r/234932
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I379a22c647b62a737557b4d0d201d2875e3cd740
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to