From: Dirk Brenken Date: Fri, 26 Jun 2020 17:35:58 +0000 (+0200) Subject: luci-app-travelmate: qrcode fix X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=06ce62b65d05806d39099b46102579eeff66aad2;p=oweals%2Fluci.git luci-app-travelmate: qrcode fix * escape more special chars which disturb qrcode generation Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm index 228479966..d8625ff30 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm @@ -193,8 +193,8 @@ This is free software, licensed under the Apache License, Version 2.0 end if ssid and enc and key then - local e_ssid = string.gsub(ssid,"[\"\\';:, ]",[[\\\%1]]) - local e_key = string.gsub(key,"[\"\\';:, ]",[[\\\%1]]) + local e_ssid = string.gsub(ssid,"[\"\\';:,()&`|<> ]",[[\\\%1]]) + local e_key = string.gsub(key,"[\"\\';:,()&`|<> ]",[[\\\%1]]) if fs.access("/usr/bin/qrencode") then qrcode = luci.sys.exec("/usr/bin/qrencode --inline --8bit --type=SVG --output=- 'WIFI:S:\"'" .. e_ssid .. "'\";T:'" .. enc .. "';P:\"'" .. e_key .. "'\";H:'" .. hidden .. "';'")