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 #5660

bug in anchor parsing

Details

Submitted2005-10-11 18:44 UTC
Fromjeremy dot lecour at gmail dot com
Assignedtoggg
StatusClosed
PackageText_Wiki
PHP Version4.4.1
OSLinux
Roadmaps(Not assigned)

Comments

[2005-10-11 18:44 UTC] jeremy dot lecour at gmail dot com

Description:
------------
Hi,

I'd like to make somme links with anchors.

My settings :
$wiki->disableRule("wikilink");
$wiki->setRenderConf('xhtml', 'freelink', 'pages', false);
$wiki->setRenderConf('Xhtml', 'freelink', 'new_url', "/
go/");
$wiki->setRenderConf('Xhtml', 'freelink', 'view_url', "/
go/");

I want to send people to
http://www.mysite.com/go/page#anchor

I have errors whan I type :
((page#anchor|go there))

I lose the # when I type :
((page|go there#anchor))

maybe it comes from here :

File : /pear/lib/Text/Wiki/Parse/Default/Freelink.php
Line 100

function process(&$matches)
{
// use nice variable names
$page = $matches[1];
$text = $matches[2];

// get rid of the leading # from the anchor, if any
$anchor = substr($matches[3], 1);
(...)

Why do we want to get ride of the # ?
If i keep it, my links work as expected.

I don't understand …