mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
Merge "Wikitext paste: Fail if result has no visible content"
This commit is contained in:
commit
2104ee1590
|
@ -106,6 +106,10 @@ ve.ui.MWWikitextStringTransferHandler.prototype.process = function () {
|
||||||
null // No sanitization, since HTML is from Parsoid
|
null // No sanitization, since HTML is from Parsoid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( !doc.data.hasContent() ) {
|
||||||
|
return failure();
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to undo outermost p-wrapping if possible
|
// Attempt to undo outermost p-wrapping if possible
|
||||||
surface = new ve.dm.Surface( doc );
|
surface = new ve.dm.Surface( doc );
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue