]> git.sommitrealweird.co.uk Git - bpgallery.git/commitdiff
Fixes XHTML Compliance
authorBrett Parker <arch@sommitrealweird.co.uk>
Sun, 22 Jan 2006 09:00:03 +0000 (09:00 +0000)
committerBrett Parker <arch@sommitrealweird.co.uk>
Sun, 22 Jan 2006 09:00:03 +0000 (09:00 +0000)
Adds in a default Alt tag if it's missing

git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--1.0--patch-10

bpgallery.sh

index ba71cc7edab3cefd248a2fedf758434f41b0ae22..f1dcee7908c88894a68eca2702c9787cf68dd527 100755 (executable)
@@ -46,8 +46,13 @@ END
 declare -rf bpgallery_default_description
 
 function bpgallery_default_thumbsline() {
+if [[ -z $caption ]]; then
+       caption_alt=Unknown
+else
+       caption_alt=$caption
+fi
 cat << END
-<div class="thumbnail"><a href="$filename"><img src="icons/$filename" /></a><div class="caption">$caption</div></div>
+<div class="thumbnail"><a href="$filename"><img src="icons/$filename" alt="$caption_alt" /></a><div class="caption">$caption</div></div>
 END
 }