{"thread":{"id":"32076","subject":"[PATCH] Re:gitweb: add readme to overview page","startedAt":"2012-11-11T16:40:39Z","lastAt":"2012-11-12T17:44:18Z","messageCount":2,"participants":["Heinrich Schuchardt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"202873","messageId":"1352652039-31453-1-git-send-email-xypron.glpk@gmx.de","threadId":"32076","inReplyTo":"74707c20a5448989963314a02858c304017b02e3","subject":"[PATCH] Re:gitweb: add readme to overview page","fromName":"Heinrich Schuchardt","fromEmail":"xypron.glpk@gmx.de","sentAt":"2012-11-11T16:40:39Z","receivedAt":"2012-11-11T16:40:39Z","isPatch":true,"sender":{"key":"xypron.glpk@gmx.de","avatar":"https://gravatar.com/avatar/ecfc545fcbe89519e2ffdf4eccf04756d830b2a7a26780b6f5b3d5d569d1d362?d=mp&s=160"},"body":"In this version of the patch the formatting has been corrected.\n\nWarnings for double / in filenames are avoided.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n\n---\n gitweb/gitweb.perl |   12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 10ed9e5..699ffac 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -6369,6 +6369,18 @@ sub git_project_list {\n \t}\n \n \tgit_project_search_form($searchtext, $search_use_regexp);\n+\t# If XSS prevention is on, we don't include README.html.\n+\t# TODO: Allow a readme in some safe format.\n+\tmy $path = \"\";\n+\tif (defined $project_filter) {\n+\t\t$path = \"/$project_filter\";\n+\t}\n+\tif (!$prevent_xss && -s \"$projectroot$path/README.html\") {\n+\t\tprint \"<div class=\\\"title\\\">readme</div>\\n\" .\n+\t\t\t\"<div class=\\\"readme\\\">\\n\";\n+\t\tinsert_file(\"$projectroot$path/README.html\");\n+\t\tprint \"\\n</div>\\n\"; # class=\"readme\"\n+\t}\n \tgit_project_list_body(\\@list, $order);\n \tgit_footer_html();\n }\n-- \n1.7.10.4\n"},{"id":"202972","messageId":"7vip9ak971.fsf@alter.siamese.dyndns.org","threadId":"32076","inReplyTo":"1352652039-31453-1-git-send-email-xypron.glpk@gmx.de","subject":"Re: [PATCH] Re:gitweb: add readme to overview page","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-11-12T17:44:18Z","receivedAt":"2012-11-12T17:44:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Heinrich Schuchardt <xypron.glpk@gmx.de> writes:\n\n> In this version of the patch the formatting has been corrected.\n>\n> Warnings for double / in filenames are avoided.\n>\n> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n>\n> ---\n\nThe above is *not* a proper log message.\n\nThose of us who are reading the messages on the list would know that\nthis is a replacement for your earlier\n\n    Message-ID: <1352647962-21910-1-git-send-email-xypron.glpk@gmx.de>\n\nwhere it has more proper description of the change, but because\nnobody will be applying that earlier one to the history (instead,\nyou would want this version to be applied), the description is lost\nin the history.\n\n>  gitweb/gitweb.perl |   12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 10ed9e5..699ffac 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -6369,6 +6369,18 @@ sub git_project_list {\n>  \t}\n>  \n>  \tgit_project_search_form($searchtext, $search_use_regexp);\n> +\t# If XSS prevention is on, we don't include README.html.\n> +\t# TODO: Allow a readme in some safe format.\n> +\tmy $path = \"\";\n> +\tif (defined $project_filter) {\n> +\t\t$path = \"/$project_filter\";\n> +\t}\n> +\tif (!$prevent_xss && -s \"$projectroot$path/README.html\") {\n> +\t\tprint \"<div class=\\\"title\\\">readme</div>\\n\" .\n> +\t\t\t\"<div class=\\\"readme\\\">\\n\";\n> +\t\tinsert_file(\"$projectroot$path/README.html\");\n> +\t\tprint \"\\n</div>\\n\"; # class=\"readme\"\n> +\t}\n>  \tgit_project_list_body(\\@list, $order);\n>  \tgit_footer_html();\n>  }\n"}]}