From: Harvie Date: Sat, 26 Mar 2011 19:38:00 +0000 (+0100) Subject: Do not close tag using shorthand X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=906f00f3dfd7336ff82fdc0d3b7fcdbe3153314d;p=mirrors%2FDokuWiki-Plugin-SVGEdit.git Do not close tag using shorthand --- diff --git a/syntax.php b/syntax.php index f30659e..d45b3be 100755 --- a/syntax.php +++ b/syntax.php @@ -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 '<'.$svgtag.'="'.$svglink.'" alt="'.$title.'" title="'.$title.'" type="image/svg+xml" />'."
"; + return '<'.$svgtag.'="'.$svglink.'" alt="'.$title.'" title="'.$title.'" type="image/svg+xml">'."
"; } function render($format, &$renderer, $data) {