【问题标题】:TYPO3 Fluid: f:uri.action encodes & with &TYPO3 流体:f:uri.action 用 & 编码 &
【发布时间】:2023-03-09 04:56:01
【问题描述】:

我目前正在将 TYPO3 6.2 网站更新到 TYPO3 8.7,但遇到了 html 编码 & 符号的问题。

这是代码:

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

在旧网站中,这会呈现以下 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

如您所见,& 符号没问题。

在 TYPO3 8.7 中,我得到了这个 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

& 符号被转换为&amp;amp;

有什么想法吗?

【问题讨论】:

    标签: typo3 fluid typo3-8.x viewhelper


    【解决方案1】:

    也许{f:uri.action() -&gt; f:format.raw()} 会有所帮助?

    【讨论】:

    • 如果您更喜欢标签语法,这也应该可以:&lt;f:format.raw&gt;&lt;f:uri.action /&gt;&lt;/f:format.raw&gt;
    【解决方案2】:

    技术背景:

    自 TYPO3 v8.0 起,ViewHelpers 默认转义其 HTML 输出 (Breaking: #69863 - Changes in ViewHelpers post Standalone-Fluid)

    【讨论】:

      猜你喜欢
      • 2017-07-14
      • 1970-01-01
      • 2014-07-12
      • 1970-01-01
      • 2015-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多