[vf] Id fields considered unescaped
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.5k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 54
Description
Affects PMD Version: 6.3
Rule: VfUnescapeEl
Description:
ID type fields in Salesforce are very limited in character set so do not need escaping but are flagged as unescaped in VF Pages
Code Sample demonstrating the issue:
class myController {
public Id idVariable {get;set;}
}
<apex:page controller="myController" >
{!idVariable}
</apex:page>
Running PMD through: CLI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the VfUnescapeEl rule and the provided Java controller and Visualforce page example. Run PMD through the CLI against this example, then verify that the Id field is no longer reported as unescaped while other fields remain covered by the rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100