Last modified: 2014-09-16 03:18:05 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 T72856, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70856 - VisualEditor: Style and bgcolor attributes normalized by Internet Explorer
VisualEditor: Style and bgcolor attributes normalized by Internet Explorer
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Initialisation (Other open bugs)
unspecified
All All
: Highest major
: VE-deploy-2014-09-18
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-15 18:18 UTC by Roan Kattouw
Modified: 2014-09-16 03:18 UTC (History)
2 users (show)

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


Attachments

Description Roan Kattouw 2014-09-15 18:18:23 UTC
When you edit a page with VE in IE, CSS styles are normalized, causing dirty diffs. This is because Internet Explorer very aggressively normalizes styles, to the point where we can't tell what the original value was without some nasty hackery.

In practice, this means that any time you save a page in IE, things like style="color: #ffffdd;" get normalized to style="color: rgb(255, 255, 221);", bgcolor="#FFFFDD" gets normalized to bgcolor="#ffffdd" and invalid CSS is removed. The former two are annoying dirty diffs, the latter is actual information loss (someone else can come along later and fix invalid CSS, but not if we remove it).

This normalization is a bug in Internet Explorer. I'm working on a workaround where I extract the original value using an XML parser and stash it so I can restore it later.

hex to rgb normalization: https://fr.wikipedia.org/?diff=107359735
bgcolor normalization: https://sv.wikipedia.org/?diff=27502354
Invalid CSS removal: https://cs.wikipedia.org/?diff=11849661
Comment 1 Gerrit Notification Bot 2014-09-16 01:41:44 UTC
Change 160583 had a related patch set uploaded by Catrope:
Work around IE's normalization of style attributes by abusing XML parsers

https://gerrit.wikimedia.org/r/160583
Comment 2 Gerrit Notification Bot 2014-09-16 01:41:55 UTC
Change 160584 had a related patch set uploaded by Catrope:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160584
Comment 3 Gerrit Notification Bot 2014-09-16 02:38:17 UTC
Change 160596 had a related patch set uploaded by Jforrester:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160596
Comment 4 Gerrit Notification Bot 2014-09-16 02:38:35 UTC
Change 160597 had a related patch set uploaded by Jforrester:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160597
Comment 5 Gerrit Notification Bot 2014-09-16 02:39:41 UTC
Change 160584 merged by jenkins-bot:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160584
Comment 6 Gerrit Notification Bot 2014-09-16 02:51:43 UTC
Change 160596 merged by Catrope:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160596
Comment 7 Gerrit Notification Bot 2014-09-16 02:51:52 UTC
Change 160597 merged by Catrope:
Use ve.parseXhtml() and ve.serializeXhtml()

https://gerrit.wikimedia.org/r/160597
Comment 8 James Forrester 2014-09-16 03:18:05 UTC
Deploy scheduled for 08:00 SF time tomorrow.

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


Navigation
Links