You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be fixed by stripping the tags from the incoming data, another approach would be to use a filter like escapejs that is in django with JSON.parse.
@michaelgwood
Sorry, my bad one. I was writing non clear English. My question is: what will be the output?
You posted the wrong output, I'd be happy if you post the correct ouptut (the correct javascript).
To avoid generating javascript that contains tags and therefore breaks a page (or worse xss) sanitise the data coming in.
e.g.
Will generate:
This could be fixed by stripping the tags from the incoming data, another approach would be to use a filter like escapejs that is in django with JSON.parse.
The text was updated successfully, but these errors were encountered: