From ec058706dc441f04477a8b7afcc509c33b418875 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 11 Sep 2020 09:04:11 +0200 Subject: [PATCH] Valid HTML --- lib/redmine_dmsf/webdav/base_resource.rb | 34 +++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index c7fea5e6..7c4f0f2c 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -55,13 +55,39 @@ module RedmineDmsf nil end + # Overridden + def index_page + %{ + + + + %s + + + +

%s

+
+ + + + + + + %s +
NameSize TypeLast Modified
+
+ + + } + end + # Generate HTML for Get requests, or Head requests if no_body is true def html_display @response.body = +'' - Confict unless collection? - entities = children.map{|child| + Confict unless collection? + entities = children.map{ |child| DIR_FILE % [ - "#{@options[:root_uri_path]}#{child.path}", + "#{@options[:root_uri_path]}#{URI.encode(child.path)}", child.long_name || child.name, child.collection? ? '' : number_to_human_size(child.content_length), child.special_type || child.content_type, @@ -69,7 +95,7 @@ module RedmineDmsf ] } * "\n" entities = DIR_FILE % [ - parent.public_path, + URI.encode(parent.public_path), l(:parent_directory), '', '',