Notifications
Clear all
Topic starter
In a phtml, you added script tag and defined couple of js variables as below:
Now to protect it from XSS attacks, which two methods allow you to keep the php variable output XSS-safe?Choose 2
- A . $block->escapeUrl($myUrl)
B. $block->escapeJs($myName)
C. $block->escapeHtmlAttr($myName)
D. $block->escapeHtmlAttr($myUrl)
Suggested Answer: AB
Posted : 18/01/2023 3:42 am