Table of Contents
svg pureinsert Plugin
Compatible with DokuWiki
Hrun
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Security advisory
Allowing SVG Upload equals to allowing HTML + JS upload. Details here: SVG Upload Security Risks
Do not allow everyone to post SVG's to your DokuWiki!
Compatibility info
As of October 2016 (Elenor Of Tsort) this plugin renders images as boxes with a regular SVG error message. However, Elenor of Tsort can handle SVG images just fine and passes the SVG source directly to the browser. So this plugin is not needed anymore.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
To enable the “media” support for SVGs you need to edit or create conf/mime.local.conf
and add at the bottom entry:
- conf/mime.local.conf
svg image/svg+xml
Please note that SVG images are supported in modern browsers only. It will not work in Internet Explorer 8 or lower. Refer to SVG compatibility list for a list of compatible Browser versions.
Usage
Usage follow the DokuWiki standard Image Syntax with the following features supported:
- alignment
- resizing
- titles can be set but will not be shown currently
Note: this plugin will download and cache remote SVGs. SVGs are rewritten to automatically scale to any viewport (maintaining the aspect original ratio).
Version History
- Merge pull request #7 from bby-bishopclark/patch-1 (2022-01-25 21:27)
- Update README.md (2022-01-25 18:40)
- README cleanup + added security advisory (2015-07-06 12:45)
- Merge pull request #4 from cosmocode/master (2015-03-16 16:36)
- fixed size calculation (2015-03-16 16:03)
- Merge pull request #3 from cosmocode/master (2015-03-10 11:04)
- fix precondition failed when calculated height is not int (2015-03-05 11:41)
- avoid division by zero if file could not be read (2015-03-04 14:33)
svgpureInsert 1.05
Thanks to Konstantin for sharing better code. Open Source rox!
- fixed issue appeared when you use dokuwiki over https (SSL)
- fixed issue with output of dia's SVGs
svgpureInsert 1.04
- changed name to svgpureInsert not to collide with svg plugin
- some other stuff done by: Goulven Guillard, thanks for sharing better code!:
- corrected the remote installation
- corrected preg_match regular expressions which didn't work fine
- set $_GET results into variables
svg_pureInsert 1.03
- some issues with “mm” and “px” size of svg
- other issues with resizing
- now supports remote installation
svg_pureInsert 1.02
- svg_pureInstert do not disturb other media files (there was issue while using SVG and JPG images on the same page)
- if no size of SVG file is given (e.g. {{egzm.svg|} }), we use default (written into SVG) image size - “You want to set not numeric width or height…” error
svg_pureInsert 1.01
- added namespace support, just forgot to test it before now: { {mcol:mcol_worm.svg?100 } } will point to proper directory (mcol/mcol_worm.svg)