aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs
diff options
context:
space:
mode:
authorhttps://www.google.com/accounts/o8/id?id=AItOawlUtmRueCOLddksWZN8zOVnseVrtRSxM58 <Per@web>2011-11-17 17:29:28 -0400
committeradmin <admin@branchable.com>2011-11-17 17:29:28 -0400
commit0c1176f0133f31776a50b11f38e752571e855b40 (patch)
tree397b33483ef47248c08adeb3b23b8d79a27757f9 /doc/bugs
parentdbfaea88738c8e753afba2e71b42fd3a1d46685d (diff)
downloadikiwiki-0c1176f0133f31776a50b11f38e752571e855b40.tar
ikiwiki-0c1176f0133f31776a50b11f38e752571e855b40.tar.gz
Diffstat (limited to 'doc/bugs')
-rw-r--r--doc/bugs/resized_img_with_only_width_or_height_breaks_ie.mdwn19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/bugs/resized_img_with_only_width_or_height_breaks_ie.mdwn b/doc/bugs/resized_img_with_only_width_or_height_breaks_ie.mdwn
index 2ab1fee36..c8196b412 100644
--- a/doc/bugs/resized_img_with_only_width_or_height_breaks_ie.mdwn
+++ b/doc/bugs/resized_img_with_only_width_or_height_breaks_ie.mdwn
@@ -4,3 +4,22 @@ In those cases img plugin do generate HTML with the missing attribute as "empty"
If we instead always get the resulting the width and height from the resized image, and uses those values in the img attrs, we make IE happy (and all other renders as well).
+Inline patch:
+
+diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
+index b98e843..398e9bc 100644
+--- a/IkiWiki/Plugin/img.pm
++++ b/IkiWiki/Plugin/img.pm
+@@ -132,9 +132,9 @@ sub preprocess (@) {
+ $imglink = $file;
+ }
+ }
+-
+- $dwidth = $im->Get("width") unless defined $dwidth;
+- $dheight = $im->Get("height") unless defined $dheight;
++ # get true image width and height from resized image attributes
++ $dwidth = $im->Get("width");
++ $dheight = $im->Get("height");
+ }
+ }
+ else {