mirror of
https://github.com/moodle/moodle.git
synced 2025-02-01 21:54:04 +01:00
fixed bug 1550 about broken anchor links
This commit is contained in:
parent
5f4aacd3a9
commit
ad6178ea81
@ -2169,10 +2169,17 @@ HTMLArea.getHTML = function(root, outputRoot, editor) {
|
||||
};
|
||||
|
||||
HTMLArea.prototype.stripBaseURL = function(string) {
|
||||
|
||||
// IE adds the path to an anchor, converting #anchor
|
||||
// to path/#anchor which of course needs to be fixed
|
||||
var index = string.indexOf("/#")+1;
|
||||
if (index > 0) {
|
||||
return string.substr(index);
|
||||
}
|
||||
return string; // Moodle doesn't use the code below because
|
||||
// Moodle likes to keep absolute links
|
||||
|
||||
var baseurl = this.config.baseURL;
|
||||
|
||||
return string; // Moodle addition to skip this whole routine
|
||||
|
||||
// strip to last directory in case baseurl points to a file
|
||||
baseurl = baseurl.replace(/[^\/]+$/, '');
|
||||
var basere = new RegExp(baseurl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user