mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Remove certain blacklisted elements when getting HTML from document
Hack to try to kill a class of bugs caused by misbehaving browser plugins. Unable to test whether this fixes them or not. Bug: 68900 Bug: 51423 Bug: 51521 Bug: 52791 Bug: 52884 Bug: 53252 Bug: 61776 Bug: 63121 Bug: 63229 Change-Id: I8af9f7ba4be45b42f6e2e382ff1a3e1f452058ba
This commit is contained in:
parent
a519522b53
commit
0547d8c8ec
|
@ -927,6 +927,16 @@ ve.init.mw.Target.prototype.getHtml = function ( newDoc ) {
|
|||
copyAttributes( oldDoc.documentElement, newDoc.documentElement );
|
||||
copyAttributes( oldDoc.head, newDoc.head );
|
||||
copyAttributes( oldDoc.body, newDoc.body );
|
||||
$( newDoc )
|
||||
.remove( 'div[id = myEventWatcherDiv]' ) // Bug 51423
|
||||
.remove( 'embed[type = "application/iodbc"]' ) // Bug 51521
|
||||
.remove( 'embed[type = "application/x-datavault"]' ) // Bug 52791
|
||||
.remove( 'script[id = FoxLingoJs]' ) // Bug 52884
|
||||
.remove( 'style[id = _clearly_component__css]' ) // Bug 53252
|
||||
.remove( 'div[id = sendToInstapaperResults]' ) // Bug 61776
|
||||
.remove( 'embed[id ^= xunlei_com_thunder_helper_plugin]' ) // Bug 63121
|
||||
.remove( 'object[type = cosymantecnisbfw], script[id=NortonInternetSecurityBF]' ) // Bug 63229
|
||||
.remove( 'div[id ^= mittoHidden' ); // Bug 68900#c1
|
||||
// Add doctype manually
|
||||
return '<!doctype html>' + ve.serializeXhtml( newDoc );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue