Merge "Fix wikitext preview in IE and Edge"

This commit is contained in:
jenkins-bot 2017-07-17 14:29:42 +00:00 committed by Gerrit Code Review
commit 0549c55ca3

View file

@ -185,7 +185,7 @@ ve.ui.MWSaveDialog.prototype.showPreview = function ( docOrMsg, baseDoc ) {
if ( docOrMsg instanceof HTMLDocument ) { if ( docOrMsg instanceof HTMLDocument ) {
body = docOrMsg.body; body = docOrMsg.body;
// Take a snapshot of all categories // Take a snapshot of all categories
body.querySelectorAll( 'link[rel="mw:PageProp/Category"]' ).forEach( function ( element ) { Array.prototype.forEach.call( body.querySelectorAll( 'link[rel="mw:PageProp/Category"]' ), function ( element ) {
categories.push( ve.dm.MWCategoryMetaItem.static.toDataElement( [ element ] ).attributes.category ); categories.push( ve.dm.MWCategoryMetaItem.static.toDataElement( [ element ] ).attributes.category );
} ); } );
// Import body to current document, then resolve attributes against original document (parseDocument called #fixBase) // Import body to current document, then resolve attributes against original document (parseDocument called #fixBase)