mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Avoid jQuery.parseHTML
Bug: T187713 Change-Id: Ic156d6fb670fa2f79cf3c1d5fe0c6272b53b6440
This commit is contained in:
parent
2c606b2918
commit
ee5b80aeee
|
@ -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 );
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue