diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-28 01:26:14 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-28 01:26:14 +0200 |
commit | dbf52de5c226443a7e20789a414cb27a7bc6991f (patch) | |
tree | 6d3e87f10b14651e45138977a73412a7ee72cf54 | |
parent | 3f919dda32231276c9388e1f1278d73465c14e3e (diff) | |
download | chawan-dbf52de5c226443a7e20789a414cb27a7bc6991f.tar.gz |
buffer: fix ampersand escaping in markURL
-rw-r--r-- | src/server/buffer.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim index cffe33b1..6b214b4e 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -1796,6 +1796,9 @@ proc markURL*(buffer: Buffer; schemes: seq[string]) {.proxy.} = of '"': data &= """ offset += 5 + of '&': + data &= "&" + offset += 4 else: data &= c inc j @@ -1812,6 +1815,7 @@ proc markURL*(buffer: Buffer; schemes: seq[string]) {.proxy.} = of '>': data &= ">" of '\'': data &= "'" of '"': data &= """ + of '&': data &= "&" else: data &= c inc j let replacement = html.fragmentParsingAlgorithm(data) |