Last modified: 2014-09-30 21:54:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70900, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68900 - VisualEditor: Put in hacks to scrub plugin garbage (e.g. myEventWatcherDiv)
VisualEditor: Put in hacks to scrub plugin garbage (e.g. myEventWatcherDiv)
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Normal normal
: VE-deploy-2014-10-02
Assigned To: Alex Monk
:
Depends on:
Blocks: ve-browserplugin
  Show dependency treegraph
 
Reported: 2014-07-31 06:27 UTC by Roan Kattouw
Modified: 2014-09-30 21:54 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2014-07-31 06:27:06 UTC
These seem to be the leading cause of edit corruption right now.

myEventWatcherDiv: https://ru.wikipedia.org/?diff=64516612 https://ru.wikipedia.org/?diff=64516412 https://pt.wikipedia.org/?diff=39659121 https://pt.wikipedia.org/?diff=39659108

<embed> tags: https://pt.wikipedia.org/?diff=39696565

<object> tags: https://fr.wikipedia.org/?diff=105796883 https://fr.wikipedia.org/?diff=105796959 https://fr.wikipedia.org/?diff=105797061

I'm thinking we should put in hacks to remove these kinds of tags. Maybe at the point where we serialize the HTML and send it to Parsoid (ve.init.mw.Target#getHTML). If these tags are added immediately upon document creation (we'd need to get our hands on one of these bad plugins to test that) we could also consider trying to work around this in ve.createDocumentFromHtml instead. I suspect, though, that these tags are probably added asynchronously, and probably only in cases where we fall back to the iframe trick because DOMParser HTML support is not available.
Comment 1 Roan Kattouw 2014-09-30 17:06:06 UTC
Here's a novel one: https://sv.wikipedia.org/?diff=27732757
Comment 2 Alex Monk 2014-09-30 21:22:43 UTC
I wonder if we can just do something like this

$( newDoc )
	.remove( '[id=myEventWatcherDiv]' ) // Bug 51423
	.remove( 'object[type=cosymantecnisbfw], script[id=NortonInternetSecurityBF]' ) // Bug 63229
	.remove( 'embed[id ^= xunlei_com_thunder_helper_plugin]' ) // Bug 63121
	.remove( 'div[id=sendToInstapaperResults]' ) // Bug 61776
	.remove( 'style[id=_clearly_component__css]' ) // Bug 53252
	.remove( 'script[id=FoxLingoJs]' ) // Bug 52884
	.remove( 'embed[type=application\\/x-datavault]' ) // Bug 52791
	.remove( 'embed[type=application\\/iodbc]' ); // Bug 51521
Comment 3 Roan Kattouw 2014-09-30 21:25:52 UTC
(In reply to Alex Monk from comment #2)
> I wonder if we can just do something like this
> 
> $( newDoc )
> 	.remove( '[id=myEventWatcherDiv]' ) // Bug 51423
> 	.remove( 'object[type=cosymantecnisbfw],
> script[id=NortonInternetSecurityBF]' ) // Bug 63229
> 	.remove( 'embed[id ^= xunlei_com_thunder_helper_plugin]' ) // Bug 63121
> 	.remove( 'div[id=sendToInstapaperResults]' ) // Bug 61776
> 	.remove( 'style[id=_clearly_component__css]' ) // Bug 53252
> 	.remove( 'script[id=FoxLingoJs]' ) // Bug 52884
> 	.remove( 'embed[type=application\\/x-datavault]' ) // Bug 52791
> 	.remove( 'embed[type=application\\/iodbc]' ); // Bug 51521

Yeah I was thinking about doing something like that. We have no easy way to know in advance what that will fix, but we can try it.
Comment 4 Gerrit Notification Bot 2014-09-30 21:38:39 UTC
Change 163961 had a related patch set uploaded by Alex Monk:
Remove certain blacklisted elements when getting HTML from document

https://gerrit.wikimedia.org/r/163961
Comment 5 Gerrit Notification Bot 2014-09-30 21:53:30 UTC
Change 163961 merged by jenkins-bot:
Remove certain blacklisted elements when getting HTML from document

https://gerrit.wikimedia.org/r/163961
Comment 6 Alex Monk 2014-09-30 21:54:13 UTC
Marking this as fixed, will keep an eye on the others in the next couple of weeks or so to see if those are resolved by it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links