mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
escape file path properly in dashboard, remove question mark scrub for now
This commit is contained in:
parent
605fa2cc74
commit
1794a4bcba
2 changed files with 1 additions and 3 deletions
|
@ -1226,8 +1226,6 @@ class Site < Sequel::Model
|
|||
raise ArgumentError, 'invalid character for filename' if c < 32
|
||||
end
|
||||
|
||||
# scrub question marks (I should probably just be erroring out for this)
|
||||
clean_path.gsub!('?', '')
|
||||
clean_path
|
||||
end
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<% if file[:is_directory] %>
|
||||
<a class="link-overlay" href="?dir=<%= Rack::Utils.escape file[:path] %>" title="View <%= file[:path] %>"></a>
|
||||
<% else %>
|
||||
<a class="link-overlay" href="<%= current_site.file_uri file[:path] %>" title="View <%= file[:path] == '/index.html' ? 'your site index' : file[:path] %>" target="_blank"></a>
|
||||
<a class="link-overlay" href="<%= current_site.file_uri Rack::Utils.escape(file[:path]) %>" title="View <%= file[:path] == '/index.html' ? 'your site index' : file[:path] %>" target="_blank"></a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue