Actions
Bug #51440
closedhtmlSpecialChars not working for typolink.returnLast = url
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2013-08-28
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
It is not possible to escape special chars like "&" in a returned URL when you are working with additionalParams.
The following is not working
10 = TEXT 10 { typolink{ parameter = 79 additionalParams = &tx_indexedsearch_pi2[action]=search&tx_indexedsearch_pi2[controller]=Search additionalParams.stdWrap.htmlSpecialChars = 1 returnLast = url } wrap = <form action="|" method="post" name="searchform" id="tx_indexedsearch"> }
The generated HTML is the following
<form action="index.php?id=79&%3Btx_indexedsearch_pi2%5Baction%5D=search&%3Btx_indexedsearch_pi2%5Bcontroller%5D=Search" method="post" name="searchform" id="tx_indexedsearch">
As you see, the & is transformed to & - the semicolon is missing.
If you remove the htmlSpecialChars = 1 from above completly the generated HTML is
<form action="index.php?id=79&tx_indexedsearch_pi2%5Baction%5D=search&tx_indexedsearch_pi2%5Bcontroller%5D=Search" method="post" name="searchform" id="tx_indexedsearch">
This is also not valid HTML.
Why is $this->lastTypoLinkUrl in \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer not htmlspecialchared directly before returning? Are there any sideeffects?
Actions