forked from phoedos/pmd
Adding a unit test and bug fix
This commit is contained in:
Sergey
committed by
Juan Martín Sotuyo Dodero
parent
595f398525
commit
eb3fe1ed08
@ -223,8 +223,7 @@ public class VfUnescapeElRule extends AbstractVfRule {
|
||||
case "$site":
|
||||
case "$page":
|
||||
isEscaped = true;
|
||||
default:
|
||||
isEscaped = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (e.equals(ESCAPING.ANY)) {
|
||||
|
@ -8,6 +8,19 @@ Id in the EL means no XSS
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
<apex:page>
|
||||
<link rel="stylesheet" type="text/css" href="{!$Resource.SDEFExtJS}/resources/css/ext-all.css" id="ext-all-css"/>
|
||||
</apex:page>
|
||||
]]></code>
|
||||
<source-type>vf</source-type>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
Id in the EL means no XSS
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
<apex:page>
|
||||
<a onclick="ShowUnregisterWindow('{!item.id}')">foo</a>
|
||||
</apex:page>
|
||||
]]></code>
|
||||
|
Reference in New Issue
Block a user