diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-22 02:38:09 +0100 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-04-13 19:05:20 +0200 |
| commit | 455db5a52615ce1281b8d724a40d0b7aa1327231 (patch) | |
| tree | 0c9ad83af3dc36243aa272ecab701471d0c1405b /html.c | |
| parent | 0bb07a022ae1ced631a64f1d35e4257365805643 (diff) | |
| download | cgit-455db5a52615ce1281b8d724a40d0b7aa1327231.tar.gz cgit-455db5a52615ce1281b8d724a40d0b7aa1327231.tar.bz2 cgit-455db5a52615ce1281b8d724a40d0b7aa1327231.zip | |
html: double escape literal + in URLs
It's unclear whether this is correct or whether my server is double
decoding.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -17,7 +17,7 @@ static const char* url_escape_table[256] = { "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", "%18", "%19", "%1a", "%1b", "%1c", "%1d", "%1e", "%1f", "%20", NULL, "%22", "%23", NULL, "%25", "%26", "%27", - NULL, NULL, NULL, "%2b", NULL, NULL, NULL, NULL, + NULL, NULL, NULL, "%252b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "%3c", "%3d", "%3e", "%3f", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -200,7 +200,7 @@ void html_url_path(const char *txt) while (t && *t) { unsigned char c = *t; const char *e = url_escape_table[c]; - if (e && c != '+' && c != '&') { + if (e && c != '&') { html_raw(txt, t - txt); html(e); txt = t + 1; |
