Last modified: 2013-11-21 20:00:08 UTC
https://fr.wikipedia.org/w/index.php?title=Marcel_Kanche&curid=6288130&diff=98045658&oldid=97964282 Looks like that new line is missing rdf info and parsoid dutifully serialized it as an a-tag. I think Parsoid should have a fallback strategy of converting them to wikilinks/extlinks.
Thanks for reporting this!!!
Closely related: bug 53568 (Automatically switch from wikitext to HTML syntax in serializer when attributes were added to elements). We basically need a method to generically figure out whether an element (in this case, a link) can be serialized to wikitext or needs / can be serialized to HTML. Also related: bug 33886 (allow <a> tags)
We currently already do support some form of this. It is only when the a-tag also has attributes that we emit the a-tag. See below [subbu@earth lib] echo "<a href="http://foo.com">bar</a>" | node parse --html2wt [http://foo.com bar] [subbu@earth lib] echo "<a title='foobar' href="http://foo.com">bar</a>" | node parse --html2wt <a title="foobar" href="http://foo.com">bar</a> However, a case can be made to drop attributes as well since we currently do drop them on a-tags with recognized RDFa attributes subbu@earth lib] echo "<a href="http://foo.com">bar</a>" | node parse --html2wt [http://foo.com bar] [subbu@earth lib] echo "<a title='foobar' href="http://foo.com">bar</a>" | node parse --html2wt <a title="foobar" href="http://foo.com">bar</a> So, this is more a matter of getting some clarity around how to handle HTML attributes in a-tags (since they cannot be represented at all in wikitext). Do we consistently drop them in all cases? In that scenario, we can always serialize any a-tag to an extlink as a default.