mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Wikitext paste: Fail if result has no visible content
For example if '[[category:foo]]' is pasted. Bug: T118191 Change-Id: I9c51846414dd6b885b33f1dc9076edadbc6464c4
This commit is contained in:
parent
b17029ccd9
commit
f9ca524ef9
|
@ -106,6 +106,10 @@ ve.ui.MWWikitextStringTransferHandler.prototype.process = function () {
|
|||
null // No sanitization, since HTML is from Parsoid
|
||||
);
|
||||
|
||||
if ( !doc.data.hasContent() ) {
|
||||
return failure();
|
||||
}
|
||||
|
||||
// Attempt to undo outermost p-wrapping if possible
|
||||
surface = new ve.dm.Surface( doc );
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue