Do not close <object> tag using shorthand
authorHarvie <tomas@mudrunka.cz>
Sat, 26 Mar 2011 19:38:00 +0000 (20:38 +0100)
committerHarvie <tomas@mudrunka.cz>
Sat, 26 Mar 2011 19:38:00 +0000 (20:38 +0100)
syntax.php

index f30659e415559574c55142553addb0995cf0a572..d45b3be4d2ae1b15006b008b86bc84dd4e0fabf3 100755 (executable)
@@ -57,12 +57,11 @@ class syntax_plugin_svgedit extends DokuWiki_Syntax_Plugin {
 
                                //use object tag for stupid browsers (like firefox) - ugly (relies on browser identification)
                                $is_webkit= preg_match('/webkit/', strtolower($_SERVER['HTTP_USER_AGENT']));
-                               if ($is_webkit)
-                                       $svgtag='img src';
-                               else
-                                       $svgtag='object '.$svg_parameters.' data';
+                               if ($is_webkit) $svgtag='img src';
+                               else $svgtag='object '.$svg_parameters.' data';
+                               $svgtag_close = array_shift(preg_split('/ /', $svgtag, 2));
 
-                               return '<a href="'.$svglink.'" type="image/svg+xml" /><'.$svgtag.'="'.$svglink.'" alt="'.$title.'" title="'.$title.'" type="image/svg+xml" /></a>'."<br />";
+                               return '<a href="'.$svglink.'" type="image/svg+xml" /><'.$svgtag.'="'.$svglink.'" alt="'.$title.'" title="'.$title.'" type="image/svg+xml">'."</$svgtag_close></a><br />";
                }
 
     function render($format, &$renderer, $data) {
This page took 0.121903 seconds and 4 git commands to generate.