Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43f4fe1

Browse files
author
Max Schaefer
committed
Update DoubleEscaping.qhelp
Somewhat ironic, considering the object of the query.
1 parent 821a7bf commit 43f4fe1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

javascript/ql/src/Security/CWE-116/DoubleEscaping.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ The following example shows a pair of hand-written HTML encoding and decoding fu
5252
<p>
5353
The encoding function correctly handles ampersand before the other characters. For example,
5454
the string <code>me &amp; "you"</code> is encoded as <code>me &amp;amp; &amp;quot;you&amp;quot;</code>,
55-
and the string <code>&quot;</code> is encoded as <code>&amp;quot;</code>.
55+
and the string <code>&amp;quot;</code> is encoded as <code>&amp;amp;quot;</code>.
5656
</p>
5757

5858
<p>
5959
The decoding function, however, incorrectly decodes <code>&amp;amp;</code> into <code>&amp;</code>
6060
before handling the other characters. So while it correctly decodes the first example above,
61-
it decodes the second example (<code>&amp;quot;</code>) to <code>&quot;</code> (a single double quote),
61+
it decodes the second example (<code>&amp;amp;quot;</code>) to <code>&quot;</code> (a single double quote),
6262
which is not correct.
6363
</p>
6464

0 commit comments

Comments
 (0)