Last modified: 2013-04-22 16:14:25 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 T43226, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41226 - HTML entities inside tag attributes fail round-tripping
HTML entities inside tag attributes fail round-tripping
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Gabriel Wicke
:
Depends on: 41948
Blocks: 39567
  Show dependency treegraph
 
Reported: 2012-10-19 21:08 UTC by Liangent
Modified: 2013-04-22 16:14 UTC (History)
4 users (show)

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


Attachments

Description Liangent 2012-10-19 21:08:48 UTC
Maybe related to bug 41217.

Try to round-trip <span title="&#x36;">a</span>
Comment 1 Gabriel Wicke 2012-11-20 05:12:31 UTC
Verified, still the case.

This is a bit lower priority for us as it 'only' produces a syntactic diff- the content does not really change. We'll see how far we get with selective serialization, and might add extra support for this if that is not sufficient.

Do you see any situations where this could be an issue beyond producing a dirty diff?
Comment 2 Liangent 2012-11-20 05:16:21 UTC
(In reply to comment #1)
> Do you see any situations where this could be an issue beyond producing a dirty
> diff?

Yes. <span title="&amp;amp;">a</span> round trips to <span title="&amp;">a</span> which is a different attribute.
Comment 3 Gabriel Wicke 2012-11-20 05:22:48 UTC
Argh- good catch!
Comment 4 Mark Holmquist 2012-12-07 23:05:15 UTC
May as well take this one.
Comment 5 Gabriel Wicke 2013-01-14 19:48:33 UTC
Patch pushed for review in https://gerrit.wikimedia.org/r/#/c/43859/. In attributes, this patch does not preserve unnecessary entities like a bare '&' escaped to &amp;. It can thus still cause syntactic diffs, but will avoid semantic diffs.

The patch also adds escaping for newly created entity-like text content.
Comment 6 Gabriel Wicke 2013-01-14 20:02:44 UTC
And merged.

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


Navigation
Links