HomePhabricator

Magic link fixes.

Authored by cscott.

Description

Magic link fixes.

  • Strip trailing punctuation from free external links (autolinked urls).

This has been broken for a while, but a parser test was recently
added in core (If8592513aa2725a11386bbf0939333e59dc62b6d)
demonstrating that Parsoid's output was incorrect.

In the process, discovered that core PHP's handling of semicolons as
the trailing punctation could break HTML entities. Parsoid does
not strip entities, so it will match core's behavior once
I5482782c25e12283030b0fd2150ac55092f7979b is merged to core.

  • Enforce word boundaries around magic links (RFC/PMID)

This change was committed to core in
Ic315b988091a5c7530a8285b9249804db72e55db; this patch makes Parsoid match
core.

  • Fix ISBN handling (bug T73462)
  • WTS fixes

Attempt to be more careful about adding <nowiki> where required around
wiki links, magic links, and autolink urls.

  • Test case exposes a new wikitext parsing bug ("Links 3. WikiLinks: No

escapes needed"): [[Foo|[Foobar]] gets misparsed.

Bug: T66300
Bug: T67278
Bug: T73462
Change-Id: I5ae8435322c78dd1df170d7a3543fff3642759b1

Details

Committed
cscottJan 13 2015, 5:55 AM
Parents
rGPAR4734be29c731: Chunk-based serializer.
Branches
Unknown
Tags
Unknown
References
refs/changes/11/178711/16
ChangeId
I5ae8435322c78dd1df170d7a3543fff3642759b1