Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
TYPO3流体平移视图辅助对象:使用";%时无输出0A%0A“;在xlf文件中_Typo3_Fluid - Fatal编程技术网

TYPO3流体平移视图辅助对象:使用";%时无输出0A%0A“;在xlf文件中

TYPO3流体平移视图辅助对象:使用";%时无输出0A%0A“;在xlf文件中,typo3,fluid,Typo3,Fluid,在我的流体模板中,我正在使用 {f:translate(键:'LLL:path/to/file/locallang.xlf:Test',参数:{0:Test'})} 阳性测试用例 locallang.xlf的内容: <?xml version="1.0" encoding="UTF-8"?> <xliff version="1.0"> <file source-language="en" datatype="plaintext" original="mess

在我的流体模板中,我正在使用

{f:translate(键:'LLL:path/to/file/locallang.xlf:Test',参数:{0:Test'})}

阳性测试用例 locallang.xlf的内容:

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2016-12-06T14:00:00Z" product-name="">
        <header/>
        <body>
            <trans-unit id="Test" xml:space="preserve">
                <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%0A]]></source>
            </trans-unit>
        </body>
    </file>
</xliff>
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2016-12-06T14:00:00Z" product-name="">
        <header/>
        <body>
            <trans-unit id="Test" xml:space="preserve">
                <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%0A%0A]]></source>
            </trans-unit>
        </body>
    </file>
</xliff>
阴性测试用例 locallang.xlf的内容:

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2016-12-06T14:00:00Z" product-name="">
        <header/>
        <body>
            <trans-unit id="Test" xml:space="preserve">
                <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%0A]]></source>
            </trans-unit>
        </body>
    </file>
</xliff>
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2016-12-06T14:00:00Z" product-name="">
        <header/>
        <body>
            <trans-unit id="Test" xml:space="preserve">
                <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%0A%0A]]></source>
            </trans-unit>
        </body>
    </file>
</xliff>

字符“%”应转义为“%”,如中所述

这导致了

 <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%%0A%%0A]]></source>

而不是

 <source><![CDATA[mailto:info@example.org?Subject=%1$s&Body=Hello%0A%0A]]></source>