From: <var...@us...> - 2016-10-13 12:55:30
|
Revision: 9961 http://sourceforge.net/p/phpwiki/code/9961 Author: vargenau Date: 2016-10-13 12:55:27 +0000 (Thu, 13 Oct 2016) Log Message: ----------- UpLoad plugin: link was incorrect if image filename contained whitespace Modified Paths: -------------- trunk/lib/plugin/UpLoad.php Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2016-10-11 08:17:04 UTC (rev 9960) +++ trunk/lib/plugin/UpLoad.php 2016-10-13 12:55:27 UTC (rev 9961) @@ -219,13 +219,16 @@ $version = $current->getVersion(); $text = $current->getPackedContent(); if (UPLOAD_USERDIR) { - $image_link = "Upload:$username/$sanified_userfile_name"; + $image_link = $username.'/'.$sanified_userfile_name; } else { - $image_link = "Upload:$sanified_userfile_name"; + $image_link = $sanified_userfile_name; } if (!is_image($sanified_userfile_name)) { // Don't inline images - $image_link = "[[" . $image_link . "]]"; + $image_link = '[[Upload:' . $image_link . ']]'; + } else { + // $image_link might contain a space + $image_link = 'Upload:' . rawurlencode($image_link); } $newtext = $text . "\n* " . $image_link; $meta = $current->_data; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |