luci-app-travelmate: qrcode fix

* escape more special chars which disturb qrcode generation

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 06ce62b65d)
This commit is contained in:
Dirk Brenken 2020-06-26 19:35:58 +02:00
parent e11af3aba9
commit ce35d0852f
No known key found for this signature in database
GPG key ID: 9D71CD547BFAE684

View file

@ -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 .. "';'")