If the href of a link is "invalid" for whatever definition of invalid, the serializer should output [http://badhref link text] or maybe just link text (plain text without a link), but not [[MediaWiki:Badtitletext|link text]] because that's just confusing for everybody.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Catrope | T93045 [[Mediawiki:Badtitletext]] being added to articles | |||
Resolved | • ssastry | T94599 Parsoid should not output [[MediaWiki:Badtitletext|...]] ever |
Event Timeline
If the ability of fixing the bad link later isn't a priority then my vote would go to emitting just the plain text.
Change 201387 had a related patch set uploaded (by Subramanya Sastry):
WIP: T94599: <a> tags with invalid hrefs serialize to text
@ssastry: the chunk-based serializer should help here -- you just emit a string chunk instead of a WikiLinkText chunk, and the escaping should take care of itself. Anything which is looking ahead at an <a> tag should be rewritten to looks at the output chunks instead, not assuming that <a> always turns into a specific chunk type.
I am already returning a string chunk instead of a WikiLinkText chunk there .. can chat more on irc tomorrow.
Change 201387 merged by jenkins-bot:
T94599: <a> tags with invalid hrefs should serialize to text