Skip to content

Commit 8ceba67

Browse files
committed
escaped print_config string
1 parent a530388 commit 8ceba67

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/redmine_gtt_print/mapfish.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def layouts(print_config)
2121
end
2222

2323
def get_capabilities(print_config)
24-
r = HTTParty.get "#{@host}/print/#{print_config}/capabilities.json"
24+
str = URI.escape(print_config)
25+
r = HTTParty.get "#{@host}/print/#{str}/capabilities.json"
2526
if r.success?
2627
JSON.parse r.body
2728
else
@@ -62,7 +63,8 @@ def get_print(ref)
6263
private
6364

6465
def request_print(json, print_config, format)
65-
url = "#{@host}/print/#{print_config}/report.#{format}"
66+
str = URI.escape(print_config)
67+
url = "#{@host}/print/#{str}/report.#{format}"
6668
if Rails.env.development?
6769
(File.open(Rails.root.join("tmp/mapfish.json"), "wb") << json).close
6870
end

0 commit comments

Comments
 (0)