GWicke has submitted this change and it was merged.

Change subject: Update normalizeOut() to handle <meta> the same as <meta /> and 
<meta >.
......................................................................


Update normalizeOut() to handle <meta> the same as <meta /> and <meta >.

The regexp used to normalize <meta> and <link> tags forced there to be
a space after the tag name... which there might not be after we normalize
out all the attributes of the meta tag.

(E.g. domino's HTML serializer doesn't add a space before the close tag.)

Change-Id: Id01a70dca569772c11f53e88043248db1ab646d5
---
M js/lib/mediawiki.Util.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  GWicke: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index f7d4463..d42b628 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -877,7 +877,7 @@
                // replace mwt ids
                .replace(/\s*id="mwt\d+"/, '')
                //.replace(/<!--.*?-->\n?/gm, '')
-               .replace(/<\/?(?:meta|link) [^>]*>/g, '')
+               .replace(/<\/?(?:meta|link)(?: [^>]*)?>/g, '')
                .replace(/<span[^>]+about="[^]+>/g, '')
                .replace(/<span><\/span>/g, '')
                .replace(/href="(?:\.?\.\/)+/g, 'href="')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id01a70dca569772c11f53e88043248db1ab646d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to