aboutsummaryrefslogtreecommitdiffstats
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-14 14:25:28 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-14 14:25:28 -0700
commit3a66e1bf9c45ac16169c3b6d4a096d5af3ba6929 (patch)
treeb18bfe33c2caa9b9305214fb50e70b0117aa664e /gitweb/gitweb.perl
parentMerge branch 'tr/diff-submodule-no-reuse-worktree' (diff)
parentgitweb: Avoid overflowing page body frame with large images (diff)
downloadgit-3a66e1bf9c45ac16169c3b6d4a096d5af3ba6929.tar.gz
git-3a66e1bf9c45ac16169c3b6d4a096d5af3ba6929.zip
Merge branch 'ak/gitweb-fit-image'
Instead of allowing an <img> to be shown in whatever size, force scaling it to fit on the page with max-height/max-width css style attributes. * ak/gitweb-fit-image: gitweb: Avoid overflowing page body frame with large images
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3bc0f0b5ca..79057b7d0e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7094,7 +7094,7 @@ sub git_blob {
git_print_page_path($file_name, "blob", $hash_base);
print "<div class=\"page_body\">\n";
if ($mimetype =~ m!^image/!) {
- print qq!<img type="!.esc_attr($mimetype).qq!"!;
+ print qq!<img class="blob" type="!.esc_attr($mimetype).qq!"!;
if ($file_name) {
print qq! alt="!.esc_attr($file_name).qq!" title="!.esc_attr($file_name).qq!"!;
}