SalesforceSalesforce
PDI · Question #77
PDI Question #77: Real Exam Question with Answer & Explanation
Sign in or unlock PDI to reveal the answer and full explanation for question #77. The question stem and answer options stay visible for context.
Submitted by naveen.iyer· Apr 18, 2026User Interface
Question
A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?
Options
- AApexPages.currentPage() .getParameters() .get('url_param')
- BApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()
- CString.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))
- DString.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))
Unlock PDI to see the answer
You've previewed enough free PDI questions. Unlock PDI for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#XSS Prevention#Security Best Practices#Visualforce#Apex Controller