[vlc-devel] [PATCH] Disable lua-precessig in locally stored js-files. Many js-scripts (e.g. JQuery) contains regular expressions that incorrect processed in the process_raw function. This commit disable lua-processing for .js files.
Alexandr Koverninsky
a.koverninsky at gmail.com
Fri Jul 12 13:06:51 CEST 2019
---
share/lua/intf/http.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua
index fc6d1a3156..d40f423bee 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -78,6 +78,10 @@ function process_raw(filename)
--]]
local code0 = string.gsub(input,escape(close_tag)," print(["..str.."[")
local code1 = string.gsub(code0,escape(open_tag),"]"..str.."]) ")
+ local fileext=filename:match("^.+(%..+)$")
+ if fileext == ".js" then
+ code1=input;
+ end
local code = "print(["..str.."["..code1.."]"..str.."])"
--[[ Uncomment to debug
if string.match(filename,"vlm_cmd.xml$") then
--
2.19.1.windows.1
More information about the vlc-devel
mailing list