We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7d7b1c3 + b9b4b05 commit 5f00be3Copy full SHA for 5f00be3
1 file changed
lib/jammit/compressor.rb
@@ -128,7 +128,7 @@ def find_base_path(paths)
128
# the namespaced prefix. Otherwise, simply use the filename.
129
def template_name(path, base_path)
130
return File.basename(path, ".#{Jammit.template_extension}") unless base_path
131
- path.gsub(/\A#{base_path}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
+ path.gsub(/\A#{Regexp.escape(base_path)}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
132
end
133
134
# In order to support embedded assets from relative paths, we need to
0 commit comments