Home » Text » Text_Wiki » Bug #8313
Link anchors should always append to link string
Details
| Submitted | 2006-07-28 11:27 UTC |
|---|---|
| From | bjs5075 at rit dot edu |
| Assigned | justinpatrin |
| Status | Closed |
| Package | Text_Wiki |
| PHP Version | 5.1.4 |
| OS | Debian etch |
| Roadmaps | (Not assigned) |
Comments
[2006-07-28 11:27 UTC] bjs5075 at rit dot edu
Description:
------------
Any place where the XHTML renderer needs to output a page+anchor combination and accepts a printf-style string (replacing "%s" with the page name), the anchor should always append to the URL, not the page name.
eg. code that looks like this:
$href = sprintf($href, $page . $anchor);
ought to look like this:
$href = sprintf($href, $page) . $anchor;
Test script:
---------------
With the format string:
.../page.cgi?test=%s&var=other
and a page link with properties:
$page = 'pagename'
$anchor = 'anchorname'
Expected result:
----------------
A link like:
.../page.cgi?test=pagename&var=other#anchorname
Actual result:
--------------
A link like:
.../page.cgi?test=pagename#anchorname&var=other