Vue · Senior · Question 28 of 75

Is binding a user-provided URL to :href safe in Vue?

Explanation

Escaping prevents breaking out of the attribute, not malicious schemes. Validate that the URL starts with https:// or is relative before storing it.

Further reading

Problem with a question

Vue · Senior · question 28

Test yourself

Take the Vue · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz