Also encode `"' (to `"') and `'' (to `'') in encode() - gopher2html - AWK script that converts a Gopher response to HTML
(HTM) hg clone https://bitbucket.org/iamleot/gopher2html
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) changeset 5ad45c945bc41f2cce8883edf0e5d291cd762c5d
(DIR) parent b971462c50d80de53288e3a717eb6af552e62d90
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 24 Jan 2018 10:06:50
Also encode `"' (to `"') and `'' (to `'') in encode()
Thanks and reported by Hiltjo Posthuma.
Diffstat:
gopher2html.awk | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff -r b971462c50d8 -r 5ad45c945bc4 gopher2html.awk
--- a/gopher2html.awk Tue Jan 23 09:52:31 2018 +0100
+++ b/gopher2html.awk Wed Jan 24 10:06:50 2018 +0100
@@ -12,6 +12,8 @@
gsub(/&/, "\\&", html)
gsub(/</, "\\<", html)
gsub(/>/, "\\>", html)
+ gsub(/"/, "\\"", html)
+ gsub(/'/, "\\'", html)
return html
}