From: <ru...@us...> - 2009-01-28 09:39:43
|
Revision: 6459 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6459&view=rev Author: rurban Date: 2009-01-28 09:39:38 +0000 (Wed, 28 Jan 2009) Log Message: ----------- Fix splitting image url's from image attributes e.g. [Upload:image.jpg size=80% align=right] Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-01-28 09:07:53 UTC (rev 6458) +++ trunk/lib/stdlib.php 2009-01-28 09:39:38 UTC (rev 6459) @@ -416,6 +416,7 @@ //if (!preg_match("/\.(".$force_img.")/i", $url)) if (empty($alt)) $alt = ""; $arr = split(' ',$url); + if (!empty($arr)) $url = $arr[0]; if ($alt == "") { $link = HTML::img(array('src' => $url, 'alt' => $alt)); } else { @@ -2319,6 +2320,7 @@ / style="font-family: Verdana, Arial, Helvetica, sans-serif" */ function parse_attributes($line) { + if (empty($line)) return array(); $line = strtolower($line); $line = str_replace(",", "", $line); $attr_chunks = preg_split("/\s* \s*/", $line); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |