Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E704 Topic 4 Question 42 Discussion

Actual exam question for Adobe's AD0-E704 exam
Question #: 42
Topic #: 4
[All AD0-E704 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Linwood
8 days ago
I'm not sure about the answer. Can someone explain why D) $block->escapeHtmlAttr($myUrl) is not one of the methods to keep the php variable output XSS-safe?
upvoted 0 times
...
Allene
9 days ago
I agree with Dean. I also think C) $block->escapeHtmlAttr($myName) is another method to protect against XSS attacks.
upvoted 0 times
...
Dean
10 days ago
I think A) $block->escapeUrl($myUrl) is one method to keep the php variable output XSS-safe.
upvoted 0 times
...
Lashaun
11 days ago
I'm not sure about the answer. Can you explain why escapeUrl and escapeHtmlAttr are the right methods to use for protecting against XSS attacks?
upvoted 0 times
...
Pura
17 days ago
I think the correct answers are B and C. Escaping the JavaScript variables is important to prevent XSS attacks.
upvoted 0 times
...
Jamey
20 days ago
I agree with Gracia. Using escapeUrl and escapeHtmlAttr functions will help prevent XSS attacks in the phtml file.
upvoted 0 times
...
Gracia
25 days ago
I think A) $block->escapeUrl($myUrl) and C) $block->escapeHtmlAttr($myName) are the correct methods to keep the php variable output XSS-safe.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77