Skip to content

Commit

Permalink
Update files/en-us/web/security/attacks/xss/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
wbamberg and hamishwillee authored Dec 13, 2024
1 parent 4557801 commit 4f095a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/security/attacks/xss/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ However, suppose the template is like this:
<div \{{ my_input }}></div>
```

The `my_input` variable will be treated as an HTML attribute by the browser. In this case, if `my_input` is `onmouseover="alert('XSS')"`, then the output encoding that Django provides won't prevent the attack.
In this context the browser will treat the `my_input` variable as an HTML attribute. If `my_input` is `onmouseover="alert('XSS')"`, the output encoding provided by Django won't prevent the attack.

The browser uses different rules to process different parts of a web page — HTML elements and their content, HTML attributes, inline styles, inline scripts. The type of encoding that needs to be done is different depending on the context in which the input is being interpolated.

Expand Down

0 comments on commit 4f095a1

Please sign in to comment.