Merge "Avoid jQuery.parseHTML"

This commit is contained in:
jenkins-bot 2018-02-20 16:50:05 +00:00 committed by Gerrit Code Review
commit d040645244
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();