mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Merge "Work around $.parseHTML( '' ) returning null"
This commit is contained in:
commit
a84aff99f5
|
@ -102,7 +102,8 @@ ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( deferred, respons
|
|||
return this.onParseError.call( this, deferred );
|
||||
}
|
||||
|
||||
contentNodes = $.parseHTML( response.visualeditor.content, this.getModelHtmlDocument() );
|
||||
// Work around https://github.com/jquery/jquery/issues/1997
|
||||
contentNodes = $.parseHTML( response.visualeditor.content, this.getModelHtmlDocument() ) || [];
|
||||
// HACK: if $content consists of a single paragraph, unwrap it.
|
||||
// We have to do this because the PHP parser wraps everything in <p>s, and inline templates
|
||||
// will render strangely when wrapped in <p>s.
|
||||
|
|
Loading…
Reference in a new issue