mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Merge pull request #802 from Semmle/xiemaisi-patch-5-1
Approved by asger-semmle
This commit is contained in:
@@ -52,13 +52,13 @@ The following example shows a pair of hand-written HTML encoding and decoding fu
|
||||
<p>
|
||||
The encoding function correctly handles ampersand before the other characters. For example,
|
||||
the string <code>me & "you"</code> is encoded as <code>me &amp; &quot;you&quot;</code>,
|
||||
and the string <code>"</code> is encoded as <code>&quot;</code>.
|
||||
and the string <code>&quot;</code> is encoded as <code>&amp;quot;</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The decoding function, however, incorrectly decodes <code>&amp;</code> into <code>&</code>
|
||||
before handling the other characters. So while it correctly decodes the first example above,
|
||||
it decodes the second example (<code>&quot;</code>) to <code>"</code> (a single double quote),
|
||||
it decodes the second example (<code>&amp;quot;</code>) to <code>"</code> (a single double quote),
|
||||
which is not correct.
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user