From: Harvie Date: Sun, 20 Jun 2010 02:17:47 +0000 (+0200) Subject: autodetection of image size for inline SVG X-Git-Url: https://git.harvie.cz/?p=mirrors%2FDokuWiki-Plugin-SVGEdit.git;a=commitdiff_plain;h=9b4c1b747f8f3550d55065c618f130085aa2c3c6 autodetection of image size for inline SVG --- diff --git a/syntax.php b/syntax.php index f814a32..c5bd599 100755 --- a/syntax.php +++ b/syntax.php @@ -56,7 +56,7 @@ class syntax_plugin_svgedit extends DokuWiki_Syntax_Plugin { //detect image size for stupid browsers (like firefox) - ugly (fails if svg does not contain information about it's size) $svg_dimensions = ''; - preg_match('/width="[0-9]+" height="[0-9]+"/', rawWiki($svg_wiki_page), $_); + preg_match('/width="[0-9]+" height="[0-9]+"/', $data[1].rawWiki($svg_wiki_page), $_); if(isset($_[0])) $svg_dimensions = $_[0]; //use object tag for stupid browsers (like firefox) - ugly (relies on browser identification)