img: only provide alt text if it was specified

if suitable alternate text is unknown, then it should not be given.
empty alt text is suitable mainly for purely decorative images.
(cherry picked from commit 3cd7f67f0cf894f4fd5ba16f68e82e4f7bdbfdc5)
master
Gabriel McManus 2008-07-07 21:33:01 +10:00 committed by Joey Hess
parent b4bbddbf3e
commit 950137eb6c
1 changed files with 1 additions and 1 deletions

View File

@ -119,9 +119,9 @@ sub preprocess (@) {
}
my $imgtag='<img src="'.$imgurl.
'" alt="'.(exists $params{alt} ? $params{alt} : '').
'" width="'.$im->Get("width").
'" height="'.$im->Get("height").'"'.
(exists $params{alt} ? '" alt="'.$params{alt}.'"' : '').
(exists $params{title} ? ' title="'.$params{title}.'"' : '').
(exists $params{class} ? ' class="'.$params{class}.'"' : '').
(exists $params{id} ? ' id="'.$params{id}.'"' : '').