From f3c6d15561920338363473ea4635f2c7c0164588 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 28 Feb 2017 13:32:50 -0800 Subject: [PATCH] Literal starting with http --- .../sourceforge/pmd/lang/vf/rule/security/VfUnescapeElRule.java | 2 +- 1 file changed, 1 insertion(+), 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 702700f31f..7703da38eb 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 @@ -114,7 +114,7 @@ public class VfUnescapeElRule extends AbstractVfRule { if (expression != null) { final ASTLiteral literal = expression.getFirstChildOfType(ASTLiteral.class); if (literal != null && literal.jjtGetChildIndex() == 0) { - if (literal.getImage().startsWith("'/") || literal.getImage().startsWith("\"/")) { + if (literal.getImage().startsWith("'/") || literal.getImage().startsWith("\"/") || literal.getImage().toLowerCase().startsWith("'http") || literal.getImage().toLowerCase().startsWith("\"http") ) { return true; } }