aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-06-29 14:17:12 -0400
committerJoey Hess <joey@kitenet.net>2011-06-29 14:17:47 -0400
commitc90bc78d440d63b0ea2f62146edc54e88fb97c32 (patch)
tree95d0dfd38bf3a5c088b0871f667d55901efb8221
parent4272e1e56d1ebd82d50473f4d68565a1dd8f2c89 (diff)
downloadikiwiki-c90bc78d440d63b0ea2f62146edc54e88fb97c32.tar
ikiwiki-c90bc78d440d63b0ea2f62146edc54e88fb97c32.tar.gz
Support svg as a inlinable image type
svg images can be included on a page by simply linking to them, or by using the img directive. Note that sanitizing svg files is still not addressed.
-rw-r--r--IkiWiki.pm2
-rw-r--r--debian/changelog3
-rw-r--r--doc/bugs/SVG_files_not_recognized_as_images.mdwn10
3 files changed, 14 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 766226338..7035cb034 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1026,7 +1026,7 @@ sub bestlink ($$) {
sub isinlinableimage ($) {
my $file=shift;
- return $file =~ /\.(png|gif|jpg|jpeg)$/i;
+ return $file =~ /\.(png|gif|jpg|jpeg|svg)$/i;
}
sub pagetitle ($;$) {
diff --git a/debian/changelog b/debian/changelog
index 8191a212a..cf17d213c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ ikiwiki (3.20110609) UNRELEASED; urgency=low
* Add libtext-multimarkdown-perl to Suggests. Closes: #630705
* headinganchors: Plugin by Paul Wise that adds ids to <hn> headings.
* html5 is not experimental anymore. But not the default either, quite yet.
+ * Support svg as a inlinable image type; svg images can be included on a
+ page by simply linking to them, or by using the img directive.
+ Note that sanitizing svg files is still not addressed.
-- Joey Hess <joeyh@debian.org> Thu, 09 Jun 2011 10:06:44 -0400
diff --git a/doc/bugs/SVG_files_not_recognized_as_images.mdwn b/doc/bugs/SVG_files_not_recognized_as_images.mdwn
index 207edd426..b14cd9b94 100644
--- a/doc/bugs/SVG_files_not_recognized_as_images.mdwn
+++ b/doc/bugs/SVG_files_not_recognized_as_images.mdwn
@@ -17,6 +17,16 @@ The 'img' plugin also seems to not support SVGs.
> image (png). The img plugin could probably do that fairly simply.
> --[[Joey]]
+>> This seems to have improved since; at least chromium can display svg
+>> images from `<img>` tags. Firefox 3.5.19 did not in my testing.
+>>
+>> So, svgs can now be included on pages by linking to them, or by using
+>> the img directive. The most portable thing is to use the img directive
+>> plus some size, which forces them to be resized and a png to actually
+>> be displayed.
+>>
+>> I have not yet tried to do anything with sanitizing them. --[[Joey]]
+
>> I'm working on inline SVG and MathML support in ikiwiki and I've
>> modified my htmlscrubber to sanitize SVG and MathML using the
>> whitelists from html5lib. Here's a [patch][]. I've also made some