escape more paths

This commit is contained in:
dreamer 2026-03-30 12:36:02 +02:00
parent 82035ea239
commit 9df7ed5be8

View File

@ -1,5 +1,6 @@
local to_json = require("lapis.util").to_json local to_json = require("lapis.util").to_json
local autoload = require("lapis.util").autoload local autoload = require("lapis.util").autoload
local escape = require("lapis.util").escape
local config = require("lapis.config") local config = require("lapis.config")
local hotmixes = autoload("hotmixes") local hotmixes = autoload("hotmixes")
@ -10,8 +11,8 @@ local function Roothandler(self)
local latest_path, latest_name = hotmixes.utils.these_latest( path ) local latest_path, latest_name = hotmixes.utils.these_latest( path )
self.total = hotmixes.utils.total_files_dir( path ) self.total = hotmixes.utils.total_files_dir( path )
self.uri = hotmixes.utils.request_path self.uri = escape(hotmixes.utils.request_path)
self.path = '/data/' .. self.titles.url .. hotmixes.utils.request_path self.path = escape('/data/' .. self.titles.url .. hotmixes.utils.request_path)
self.dirs = stuff.dirs self.dirs = stuff.dirs
self.files = stuff.files self.files = stuff.files
self.images = stuff.images self.images = stuff.images