- my $cleaned_png = $png; $cleaned_png =~ s/%/%25/g;
- print OUT <<END;
-<P><IMG src="$cleaned_png" alt="${bn} $span"></P>
+ my $cleaned_img = $img; $cleaned_img =~ s/%/%25/g;
+ if (! $svg_p) {
+ print OUT <<END;
+<p class="graph"><img src="$cleaned_img" alt="${bn} $span" /></p>
+END
+ } else {
+ print OUT <<END;
+<p class="graph"><object data="$cleaned_img" type="image/svg+xml">
+ ${bn} $span</object></p>