X-Git-Url: http://git.purplebirdman.com/public.git/blobdiff_plain/0e07fad7633fc93fb0ce69cf0e14f8b0558e1d9f..fc364c1da3177dfea00a06bcfccb4eedd5d86e97:/lua/publish.lua diff --git a/lua/publish.lua b/lua/publish.lua index afe2fed..f562018 100644 --- a/lua/publish.lua +++ b/lua/publish.lua @@ -21,9 +21,12 @@ function handle(r) r.content_type = "text/html" local args = r:parseargs() - local pattern = string.gsub(args.pattern, '+', ' ') + local pattern = args.pattern if pattern then + -- filename might have spaces that apache replaces with '+' + pattern = string.gsub(pattern, '+', ' ') + local nonce = publish(r.context_document_root, pattern) if nonce == "" then r:puts( "No links created" )