01296: Link brackets should not be removed when link has text

Summary: Link brackets should not be removed when link has text
Created: 2012-09-16 21:46
Status: Open
Category: Bug
From: simon
Priority: 3
Version: 2.2.42
OS: n/a



[[Canton -> Wikipedia:Canton_(country_subdivision)]]



Where a link has separate link text the parsing should not remove the round brackets in the link





To keep consistency in link markups, this shouldn't be changed. The rule is that parentheses are removed from link targets, and parts in parentheses is removed from link text. --Petko

Have to agree to disagree on this one, I don't think this is being consistent, its just breaking URIs. Perhaps this could go on the list for PmWiki 3.0 to change brackets to some other characters (eg {} or [])

simon October 07, 2012, at 04:49 PM

When I copy the link address from a page, or the page address from the url bar, even when I see the parentheses in the url bar, my clipboard has them encoded to %28...%29. When I paste them in the wiki page, they are still correctly encoded as %28...%29, and the link will not break. Moreover, like my browser, PmWiki simply respects the standard which requires sub-delimiters "(" and ")" to be encoded.

I fear that if we do it for some links, someone will demand that for the sake of consistency, we do it for all links. This behavior should be well documented, if you don't think it is, feel free to improve the documentation. There is also a FixURL recipe which can help authors encode their links. --Petko

If we decide for PmWiki 3.0 to ignore the standard, or to make it configurable, at least our documentation (all languages) shouldn't contain shortcut links: [[(Wikipedia:)Wiki]] should be rewritten as [[Wikipedia:Wiki|Wiki]] in order to work when the feature is "on" or "off". I wouldn't use the [[Text->Target]] markup, much less common among wiki software than [[Target|Text]]. --Petko