From d1777c016d1e963b06869775becdc38a4a00ecb8 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Mon, 19 Feb 2024 17:33:41 -0800 Subject: [PATCH] Correctly escape characters in the mailto: urls (#1099) --- files/usr/lib/lua/aredn/http.lua | 3 +++ files/www/cgi-bin/vpn | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/usr/lib/lua/aredn/http.lua b/files/usr/lib/lua/aredn/http.lua index f49fabe1..c04addc2 100755 --- a/files/usr/lib/lua/aredn/http.lua +++ b/files/usr/lib/lua/aredn/http.lua @@ -94,3 +94,6 @@ function parsecgi(str) end -- Written by RiciLake -- END +function encode_uri_component(str) + return str:gsub(" ", "%%20"):gsub("%+", "%%2B"):gsub("=", "%%3D") +end diff --git a/files/www/cgi-bin/vpn b/files/www/cgi-bin/vpn index 0cd29946..10adee43 100755 --- a/files/www/cgi-bin/vpn +++ b/files/www/cgi-bin/vpn @@ -753,7 +753,7 @@ do html.print("") else html.print("") - html.print("") + html.print("") html.print("") end html.print("Contact Info/Comment (Optional):