Issue Bug Closed

#14646Not HTML compliant Links by getTypoLink function

Marc Wöhlken 04/07/05, 02:09 updated 04/07/05, 07:39

Description

The getTypoLink (tslib_class.tslib_content.php) function produces non standard conform links.
This concerns the ampersand ‘&’ used to concatenate GET Params.

E.g.:
http://www.mysite.con/index.php?id=5&param=value

should be
http://www.mysite.con/index.php?id=5&param=value

Entities like ‘&’ have to be resolved.

For a fix see code listing.

function getTypoLink($label,$params,$urlParameters=array(),$target=’‘)    {
…
while(list($k,$v)=each($urlParameters)) {
$conf[‘additionalParams’].=’&’.$k.’=’.@rawurlencode($v);
}
…
}

Sould be
function getTypoLink($label,$params,$urlParameters=array(),$target=’‘) {
…
while(list($k,$v)=each($urlParameters)) {
$conf[‘additionalParams’].=’&’.$k.’=’.@rawurlencode($v);
}
…
}

(issue imported from #M946)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.