From f2a9ccd5bdf8a892801df937dc25ed19a9fe4aec Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 21 Nov 2018 18:47:19 +0000 Subject: [PATCH] Avoid HTML string parsing Identified using https://github.com/wikimedia/eslint-plugin-jquery/pull/12 Change-Id: I138e018fdc037d688e055eacddfdc5bfc2cc5abe --- modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js | 2 +- modules/ve-mw/init/ve.init.mw.ArticleTarget.js | 6 +++--- .../contextitems/ve.ui.MWLanguageVariantNodeContextItem.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js index 8b25bbff22..6311b31fd4 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js @@ -77,7 +77,7 @@ ve.ce.MWExtensionNode.prototype.generateContents = function ( config ) { .fail( this.onParseError.bind( this, deferred ) ); return deferred.promise( { abort: xhr.abort } ); } else { - deferred.resolve( $( ' ' ).get() ); + deferred.resolve( $( '' ).text( '\u00a0' ).get() ); return deferred.promise(); } }; diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 1f53fb4922..e180678bb1 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -2644,7 +2644,7 @@ ve.init.mw.ArticleTarget.prototype.renderCategories = function ( categoryItems ) } ) ); } ); return $.when.apply( $, promises ).then( function () { - var $output = $( '