Bug #18022
closedHardcoded Ampersand in t3lib_div::implodeArrayForUrl
0%
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&%3Btx_ablinklist_pi1%5Buid%5D=2&%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
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㜽L=0&amp㜽amp;tx_ablinklist_pi1[action]=getviewcatalog&amp㜽amp;tx_ablinklist_pi1[category_uid]=2&amp㜽cHash=8b60285180" class="tx_ablinklist_catalogView_categoryLabel">Linklabel</a>
Looks like TYPO3 put to &㜽 his own amp㜽 - this Link don´t link to anywhere
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.