]> Untitled Git - public.git/blobdiff - lua/publish.lua
Hotfix 1.3.1
[public.git] / lua / publish.lua
index afe2fed871cf46c3ffc98e4b0efbd073d014e42c..f5620183cfdd906030a0bba48d321c6d40f654f0 100644 (file)
@@ -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" )