[pmwiki-users] Problem with link + title rendering
Patrick R. Michaud
pmichaud at pobox.com
Thu Aug 31 12:01:49 CDT 2006
On Thu, Aug 31, 2006 at 04:44:19PM +0000, J. Meijer wrote:
> Continuing my experimentation (in a blank pmwiki 2.1.18), I'm having a problem with link title rendering when passing parameters on the url.
> For example when having these links:
> [[Main.HomePage?name=value | Text]]
> [[Main.HomePage?name=value | +]]
> The first link renders correctly,but the second mangles the link (into 'HomePageNameValue') and puts it up as the linktext. Both links correctly infer that the target page exists.
> Am I doing something wrong? It does seem strange I should be
> first to discover this.
You're the first to report it. And yes, it's a bug.
You might try the following fix, in local/config.php:
$MakePageNamePatterns = array(
"/[?#].*$/", => '', # strip everything after ? or #
"/'/" => '', # strip single-quotes
"/[^$PageNameChars]+/" => ' ', # convert everything else to space
"/((^|[^-\\w])\\w)/e" => "strtoupper('$1')",
"/ /" => '');
If this solves the problem, it'll likely be adopted into the core.
I'm also thinking of moving the !Category conversion syntax into
MakePageName(), which would solve a number of issues in trails
and a few other places. For example, the following would then
work to find all pages in the XYZ category:
More information about the pmwiki-users