← Quiz: XSS: all 10 questions
Quiz: XSS · Question 8 of 10
What does this print? (code)
What does this print?
from html import escape
print(escape('<b>"Hi"</b>'))
- A.<b>"Hi"</b>
- B.<b>"Hi"</b>
- C.<b>"Hi"</b>
- D.It raises an error
Answer & explanation
Correct answer: <b>"Hi"</b>
escape encodes <, >, & and, by default, quotes too.
Can you get the rest right without peeking?
Take the timed Quiz: XSS quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →