PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Wiki » Bug #8313

Link anchors should always append to link string

Details

Submitted2006-07-28 11:27 UTC
Frombjs5075 at rit dot edu
Assignedjustinpatrin
StatusClosed
PackageText_Wiki
PHP Version5.1.4
OSDebian 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