Page MenuHomePhabricator

Parsoid: Comments inside link labels not preserved correctly
Closed, ResolvedPublic

Description

Elitre on 49608:
"Not sure if it's the same thing, but I just did this today
http://it.wikipedia.org/w/index.php?title=Google&diff=59622535&oldid=59377529
and it discarded commented text which, as noted above, should be there for a
reason :)"


Version: unspecified
Severity: normal

Details

Reference
bz50054

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:54 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50054.

Some specific examples:

[http://www.google.com Google <!-- comment text -->]
[[Main Page|Page<!-- comment text -->]]
<ref>[http://www.google.com Google <!-- comment text -->]</ref>

round trip to

[http://www.google.com Google ]<!-- comment text -->
[[Main Page|Page]]<!-- comment text -->
<ref>[http://www.google.com Google ]</ref>

This is at least partly a Parsoid bug. The first link parses to:

<p data-parsoid="{&quot;dsr&quot;:[0,52,0,0]}"><a rel="mw:ExtLink" href="http://www.google.com" data-parsoid="{&quot;targetOff&quot;:23,&quot;dsr&quot;:[0,52,23,1]}">Google </a></p><!-- comment text -->

Related URL: https://gerrit.wikimedia.org/r/70057 (Gerrit Change Ic4c5c8c8f87703e6e4fe18620075a891f8015fca)

https://gerrit.wikimedia.org/r/70057 (Gerrit Change Ic4c5c8c8f87703e6e4fe18620075a891f8015fca) | change APPROVED and MERGED [by jenkins-bot]