Format a wikilink as an HTML hyperlink with the given link_text. If the wikilink
doesnt exist, it will be rendered as a hyperlink to an .edit page ready to be
Since there is no difference in syntax between new and existing links, some
abiguities my occur when it comes to characters that are invalid in URLs. For
* [[say NO to #8]] should be rendered as <a href="say_%22NO%22_to_%238">say "NO" to #8</a>
* [[100% match]] should be rendered as <a href="100%25_match>100% match</a>, URL-escaping the %
* but what about a user pasting an existing link, [[say_%22NO%22_to_%238]]? We shouldnt URL-escape the % or # here.
* for links with explicit link text, we should definitiely not URL-escape the link: [[say_%22NO%22_to_%238|say "NO" to #8]]
This is complicated by the fact that # can delimit the start of the anchor portion of a link.
* [[Mambo #5]] - URL-escape # => Mambo_%235
* [[Mambo#origins]] - do not URL-escape
* [[existing/link#Introduction|See the Introduction]] - definitely do not URL-escape
Since escaping is somewhat magic and therefore potentially counter-intuitive,
* only URL-escape # if it follows a whitespace directly
* always URL-escape % unless it is followed by two uppercase hex digits
* always escape other characters that are invalid in URLs