Browser & Web Performance · Middle · Question 58 of 75

Why is <a href={userUrl}> dangerous if userUrl isn't validated?

Explanation

Escaping text doesn't help with URLs. Allow only http: and https: (and maybe mailto:) schemes.

Further reading

Problem with a question

Browser & Web Performance · Middle · question 58

Test yourself

Take the Browser & Web Performance · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz