1 The [[ikiwiki/directive/img]] directive emits an extra double quote if alt=x is
2 specified (as is necessary for valid HTML). This results in malformed HTML,
5 <img src="U" width="W" height="H"" alt="A" />
8 This [[patch]] is available from the img-bugfix branch in my git repository:
10 commit a648c439f3467571374daf597e9b3a659ea2008f
11 Author: Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
12 Date: 2009-06-16 17:15:06 +0100
14 img plugin: do not emit a redundant double-quote before alt attribute
16 diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
17 index a697fea..a186abd 100644
18 --- a/IkiWiki/Plugin/img.pm
19 +++ b/IkiWiki/Plugin/img.pm
20 @@ -121,7 +121,7 @@ sub preprocess (@) {
21 my $imgtag='<img src="'.$imgurl.
22 '" width="'.$im->Get("width").
23 '" height="'.$im->Get("height").'"'.
24 - (exists $params{alt} ? '" alt="'.$params{alt}.'"' : '').
25 + (exists $params{alt} ? ' alt="'.$params{alt}.'"' : '').
26 (exists $params{title} ? ' title="'.$params{title}.'"' : '').
27 (exists $params{class} ? ' class="'.$params{class}.'"' : '').
28 (exists $params{id} ? ' id="'.$params{id}.'"' : '').