Project

General

Profile

Actions

Bug #18022

closed

Hardcoded Ampersand in t3lib_div::implodeArrayForUrl

Added by Stefano Kowalke almost 17 years ago. Updated almost 13 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-01-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

One extension (ab_linklist) in my TYPO3 Installation called the tslib_pibase::pi_getPageLink() to build a URL with GET-Parameters.

$this->pi_getPageLink( $GLOBALS['TSFE']->id, '_blank', array( 'tx_ablinklist_pi1[action]' => 'getviewclickedlink', 'tx_ablinklist_pi1[uid]' => $record['uid'], 'no_cache' => '1' ) );

But the function rendered the Output without escape the Ampersands (&) into & :

index.php?id=14&tx_ablinklist_pi1[action]=getviewclickedlink&tx_ablinklist_pi1[uid]=2&no_cache=1

I fixed this and all looks fine, but it dont work together with the realurl extension, since realurl modify the PID Parameter (id=2) into "start" or something. Then you get a URI like this:

start/?amp%3Btx_ablinklist_pi1%5Baction%5D=getviewclickedlink&amp%3Btx_ablinklist_pi1%5Buid%5D=2&amp%3Bno_cache=1

I think realurl filters the "&" but not "&" when its build the URL. Besides from this realurl cut the ";" from "&".
(issue imported from #M7208)


Files

class.t3lib_div.diff (1.99 KB) class.t3lib_div.diff Administrator Admin, 2008-01-18 22:17
Actions #1

Updated by Stefano Kowalke almost 17 years ago

The patch don´t fix this issue. I fiddle around a bit and see that TYPO3 build now such URLs:
<a href="index.php?id=2&amp;amp&#14141;L=0&amp;amp&#14141;amp;tx_ablinklist_pi1[action]=getviewcatalog&amp;amp&#14141;amp;tx_ablinklist_pi1[category_uid]=2&amp;amp&#14141;cHash=8b60285180" class="tx_ablinklist_catalogView_categoryLabel">Linklabel</a>

Looks like TYPO3 put to &amp㜽 his own amp㜽 - this Link don´t link to anywhere

Actions #2

Updated by Dmitry Dulepov almost 13 years ago

  • Category deleted (Communication)
  • Status changed from New to Rejected
  • Target version deleted (0)

The behavior described here is correct. pi_getPageLink actually gives you a URL only, not a complete link. You must encode it further with a htmlspecialchars() if you want to use it in HTML.

This is not a bug.

Actions

Also available in: Atom PDF