link resource MDL-16272 fix anchor into the url (not urlescaped anymore), merged from 19
This commit is contained in:
+6
-1
@@ -44,7 +44,12 @@ function get_file_url($path, $options=null, $type='coursefile') {
|
||||
|
||||
if ($CFG->slasharguments) {
|
||||
$parts = explode('/', $path);
|
||||
$parts = array_map('rawurlencode', $parts);
|
||||
foreach ($parts as $key => $part) {
|
||||
/// anchor dash character should not be encoded
|
||||
$subparts = explode('#', $part);
|
||||
$subparts = array_map('rawurlencode', $subparts);
|
||||
$parts[$key] = implode('#', $subparts);
|
||||
}
|
||||
$path = implode('/', $parts);
|
||||
$ffurl = $url.'/'.$path;
|
||||
$separator = '?';
|
||||
|
||||
Reference in New Issue
Block a user