Salesforce
CRT-450 · Question #77
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?
Sign in or unlock CRT-450 to reveal the answer and full explanation for question #77. The question stem and answer options stay visible for context.
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 CRT-450 to see the answer
You've previewed enough free CRT-450 questions. Unlock CRT-450 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.