Extend unit tests, refs #1100

This commit is contained in:
Andreas Dangel
2018-05-16 19:30:02 +02:00
parent 9a2ac14b05
commit 7b51dd1570

View File

@ -665,4 +665,29 @@ URLENCODE is ignored as valid escape method #1100
<source-type>vf</source-type>
</test-code>
<test-code>
<description><![CDATA[
a onclick snippet should be escaped #1100
]]></description>
<expected-problems>1</expected-problems>
<code><![CDATA[
<a onclick="openTab('/apex/Download?redirectUrl={!downloadURL}', 'test');">
]]></code>
<source-type>vf</source-type>
</test-code>
<test-code>
<description><![CDATA[
ensure all encoding methods are considered valid #1100
]]></description>
<expected-problems>0</expected-problems>
<code><![CDATA[
<a onclick="openTab('/apex/Download?redirectUrl={!URLENCODE(downloadURL)}', 'test');">
<a onclick="openTab({!JSENCODE('/apex/Download?redirectUrl=' + downloadURL)}', 'test');">
<a onclick="openTab({!JSINHTMLENCODE('/apex/Download?redirectUrl=' + downloadURL)}', 'test');">
<a onclick="openTab({!HTMLENCODE('/apex/Download?redirectUrl=' + downloadURL)}', 'test');">
]]></code>
<source-type>vf</source-type>
</test-code>
</test-data>