|
Hi,
first look: I confirmed the bug and that the url gets rawurlencode() it's here: ------------------------------------------------------------ ------------------------------------------------------------ Here a solution for managing anchor:
------------------------------------------ Current code ------------------------------------------ if ($CFG->slasharguments) { $parts = explode('/', $path); $parts = array_map('rawurlencode', $parts); $path = implode('/', $parts); $ffurl = $url.'/'.$path; $separator = '?'; } ------------------------------------------ Patch ------------------------------------------ if ($CFG->slasharguments) { $parts = explode('/', $path); foreach ($parts as $key => $part) { $subparts = explode('#', $part); $subparts = array_map('rawurlencode', $subparts); $parts[$key] = implode('#', $subparts); } $path = implode('/', $parts); $ffurl = $url.'/'.$path; $separator = '?'; } Looking if we really need to manage colon (it would complicate the code for nothing) This patch needs to be reviewed before commit. (open an new issue for colon if needed)
Tested here with $path string seems to work perfectly with hashes and slashes being respected. So, I think we can ignore colons for now.
Note: In HEAD, I've found TWO occurrences of "array_map('rawurlencode"), one in lib/filelib and another in lib/file/file_browser.php. Not sure if both need the hash-hack but ideally it should be present IMO. +1 Thanks! Thanks Jeff for the report.
Thanks Eloy for the review. commited |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Jerome can you reproduce and if possible, avoid urlscaping colons, slashes and hashes? : / #
And see if that fixes the problem. Ciao