Page MenuHomePhabricator

Parsoid should not output [[MediaWiki:Badtitletext|...]] ever
Closed, ResolvedPublic

Description

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.

Event Timeline

Catrope claimed this task.
Catrope raised the priority of this task from to High.
Catrope updated the task description. (Show Details)
Catrope set Security to None.

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

https://gerrit.wikimedia.org/r/201387

@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

https://gerrit.wikimedia.org/r/201387