diff --git a/code/handlers/roothandler.lua b/code/handlers/roothandler.lua index da32989..4702397 100644 --- a/code/handlers/roothandler.lua +++ b/code/handlers/roothandler.lua @@ -1,5 +1,6 @@ local to_json = require("lapis.util").to_json local autoload = require("lapis.util").autoload +local escape = require("lapis.util").escape local config = require("lapis.config") local hotmixes = autoload("hotmixes") @@ -10,8 +11,8 @@ local function Roothandler(self) local latest_path, latest_name = hotmixes.utils.these_latest( path ) self.total = hotmixes.utils.total_files_dir( path ) - self.uri = hotmixes.utils.request_path - self.path = '/data/' .. self.titles.url .. hotmixes.utils.request_path + self.uri = escape(hotmixes.utils.request_path) + self.path = escape('/data/' .. self.titles.url .. hotmixes.utils.request_path) self.dirs = stuff.dirs self.files = stuff.files self.images = stuff.images