SF.net SVN: phpwiki:[10908] trunk/lib/plugin/UpLoad.php

vargenau--- via phpwiki-checkins <[email protected]> Tue, 18 Jan 2022 17:01:26 +0000
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 10908
          http://sourceforge.net/p/phpwiki/code/10908
Author:   vargenau
Date:     2022-01-18 17:01:26 +0000 (Tue, 18 Jan 2022)
Log Message:
-----------
In case there is an UPLOAD_USERDIR, the "/" must not be urlencoded

Modified Paths:
--------------
    trunk/lib/plugin/UpLoad.php

Modified: trunk/lib/plugin/UpLoad.php
===================================================================
--- trunk/lib/plugin/UpLoad.php	2022-01-18 15:58:50 UTC (rev 10907)
+++ trunk/lib/plugin/UpLoad.php	2022-01-18 17:01:26 UTC (rev 10908)
@@ -223,6 +223,8 @@
                         } else {
                             // $image_link might contain a space
                             $image_link = 'Upload:' . rawurlencode($image_link);
+                            // In case there is an UPLOAD_USERDIR, the "/" must not be urlencoded
+                            $image_link = str_replace("%2F", "/", $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.