Peter Kraume
Peter Kraume

Reputation: 3747

TYPO3 Fluid: f:uri.action encodes & with &

I'm currently updating a TYPO3 6.2 website to TYPO3 8.7 and have a problem with html encoded ampersands.

This is the code:

<f:uri.action action="xml" extensionName="foobar" pluginName="barbazxml" controller="Items" pageType="102" arguments="{exclude:exclude,cat:cat}" />

In the old website, this renders this URL:

rdf.xml?tx_foo_bar%5Bexclude%5D=123&tx_foo_bar%5Bcat%5D=117&tx_foo_bar%5Baction%5D=xml&tx_foo_bar%5Bcontroller%5D=Items&cHash=4310d7e9385e74b2eee5380aa0d46e1f

As you can see, the ampersands are ok.

In TYPO3 8.7 I get this URL:

rdf.xml?tx_foo_bar%5Bexclude%5D=123&amp;tx_foo_bar%5Bcat%5D=117&amp;tx_foo_bar%5Baction%5D=xml&amp;tx_foo_bar%5Bcontroller%5D=Items&amp;cHash=4310d7e9385e74b2eee5380aa0d46e1f

The ampersands are converted to &amp;.

Any ideas?

Upvotes: 0

Views: 1615

Answers (2)

Julian Hofmann
Julian Hofmann

Reputation: 2557

The technical background:

Since TYPO3 v8.0, ViewHelpers escape their HTML output by default (Breaking: #69863 - Changes in ViewHelpers post Standalone-Fluid)

Upvotes: 1

Albrecht Koehnlein
Albrecht Koehnlein

Reputation: 86

Maybe {f:uri.action() -> f:format.raw()} would help?

Upvotes: 3

Related Questions