From f093132e4efe46015e44978b71e3f2c517af3d2b Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 22 Feb 2017 12:59:12 -0800 Subject: [PATCH] Reducing FPs with URLFor --- .../pmd/lang/vf/rule/security/VfUnescapeElRule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/security/VfUnescapeElRule.java b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/security/VfUnescapeElRule.java index bf6ab8336f..937b5cb67b 100644 --- a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/security/VfUnescapeElRule.java +++ b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/security/VfUnescapeElRule.java @@ -161,7 +161,8 @@ public class VfUnescapeElRule extends AbstractVfRule { break; } - if ("$Resource".equalsIgnoreCase(id.getImage())) { + if ("$Resource".equalsIgnoreCase(id.getImage()) || "URLFOR".equalsIgnoreCase(id.getImage()) || "$Site".equalsIgnoreCase(id.getImage()) + || "$Page".equalsIgnoreCase(id.getImage())) { isEscaped = true; continue; }