Avoid jQuery.parseHTML

Bug: T187713
Change-Id: Ic156d6fb670fa2f79cf3c1d5fe0c6272b53b6440
This commit is contained in:
Ed Sanders 2018-02-19 15:41:20 +00:00
parent 2c606b2918
commit ee5b80aeee
4 changed files with 4 additions and 4 deletions

View file

@ -186,7 +186,7 @@ ve.init.mw.DesktopArticleTarget.prototype.getEditableContent = function () {
$editableContent = $( '#mw-imagepage-content' );
if ( !$editableContent.length ) {
// No image content, file doesn't exist, or is on Commons?
$editableContent = $( '<div id="mw-imagepage-content">' );
$editableContent = $( '<div>' ).attr( 'id', 'mw-imagepage-content' );
$before = $( '.sharedUploadNotice, #mw-imagepage-nofile' );
if ( $before.length ) {
$before.first().after( $editableContent );

View file

@ -1725,7 +1725,7 @@ ve.init.mw.ArticleTarget.prototype.submit = function ( wikitext, fields ) {
}
// Save DOM
this.submitting = true;
$form = $( '<form method="post" enctype="multipart/form-data" style="display: none;"></form>' );
$form = $( '<form>' ).attr( { method: 'post', enctype: 'multipart/form-data' } ).addClass( 'oo-ui-element-hidden' );
params = ve.extendObject( {
format: 'text/x-wiki',
model: 'wikitext',

View file

@ -415,7 +415,7 @@ ve.ui.MWSaveDialog.prototype.showMessage = function ( name, message, options ) {
if ( options.wrap === undefined ) {
options.wrap = 'warning';
}
$message = $( '<div class="ve-ui-mwSaveDialog-message"></div>' );
$message = $( '<div>' ).addClass( 've-ui-mwSaveDialog-message' );
if ( options.wrap !== false ) {
$message.append( $( '<p>' ).append(
// visualeditor-savedialog-label-error

View file

@ -37,7 +37,7 @@ ve.ui.MWAceEditorWidget = function VeUiMWAceEditorWidget( config ) {
this.autocomplete = config.autocomplete || 'none';
this.autocompleteWordList = config.autocompleteWordList || null;
this.$ace = $( '<div dir="ltr">' );
this.$ace = $( '<div>' ).attr( 'dir', 'ltr' );
this.editor = null;
// Initialise to a rejected promise for the setValue call in the parent constructor
this.loadingPromise = $.Deferred().reject().promise();