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:
Ed Sanders 2015-11-17 17:42:47 -08:00 committed by Jforrester
parent b17029ccd9
commit f9ca524ef9

View file

@ -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 {