Project

General

Profile

Actions

Bug #15693

closed

typoLink is htmlspecialchared, so the links are wrong

Added by Franz Holzinger almost 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

With the Beta3 the links for the shop system are generated with wrong parameters like <a href="index.php?id=51&amp;backPID=13&amp;tt_products=2094">
where it should have been
<a href="index.php?id=51&backPID=13&amp;tt_products=2094">

This error comes from class.tslib_content.php
function typoLink($linktxt, $conf).

$finalTagParts['url']=$this->lastTypoLinkUrl;
However $this->lastTypoLinkUrl contains parameters separated with '&'.

$res = '<a href="'.htmlspecialchars($finalTagParts['url']).'"'.($title?' title="'.$title.'"':'').$finalTagParts['targetParams'].($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';

Here the wrong htmlspecialchars it applied to the url with parameters.

Debug Infos:
--------------------------
$conf
String (2) parameter 51
String (36) additionalParams &backPID=13&tt_products=2091

[debug] in
String (2) $link_param 51

Array (4)
$finalTagParts
String (1) aTagParams
String (51) url index.php?id=51&backPID=13&tt_products=2091
String (0) targetParams
String (4) TYPE page

$res <a href="index.php?id=51&amp;backPID=13&amp;tt_products=2091" >


(issue imported from #M2657)


Files

correctHtmlLinks.diff (1.96 KB) correctHtmlLinks.diff Administrator Admin, 2006-02-21 21:58
Actions

Also available in: Atom PDF