01245: Links with quotes don't work correctly

Summary: Links with quotes don't work correctly
Created: 2011-02-25 02:09
Status: Closed - replied
Category: Not a bug
From: Simon
Assigned:
Priority: 3
Version: 2.2.24
OS: n/a

Description: Link to a search action

Doesn't work
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q="search+links"|Information about links]]

Information about links

Single quotes
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q='search+links'|Information about links]]

Single quotes are not allowed in the query fragment of a URL after ? (like spaces and <>"{}|\^`()[]'), but you can encode it with %27.

Single quotes
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q=%27search+links%27|Information about links]]

Information about links

no quotes
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q=search+links|Information about links]]

Information about links

Doesn't work
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q="search+links"|Information about links]]

Information about links

Should be expected to produce "tooltip title" of the link in the quotes, like for pictures. Use %22 to use quotes in URLs. A comparable behavior can be found if you try to use parentheses in URLs, they have a different meaning for PmWiki. --Petko February 25, 2011, at 03:51 AM

Use %22 instead of quotes in URLs
[[PmWiki.Links?target=Site.Search&action=search&group=pmwiki&q=%22search+links%22|Information about links]]

Information about links

In the long term PmWiki should be capable of accepting pasted links. There has been discussion elsewhere about changing () to other characters, can PmWiki in parsing the link make a better informed decision about tool tips, or perhaps we need a better syntax for tool tips. simon February 28, 2011, at 03:44 PM

See also Cookbook:FixURL which encodes the special characters in link addresses. --Petko November 01, 2011, at 03:09 PM