From: moodler Date: Mon, 17 May 2004 08:04:28 +0000 (+0000) Subject: Added a line to disable this function: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d034765aeb60abc6be967f3498a9a929c800c957;p=moodle.git Added a line to disable this function: HTMLArea.prototype.stripBaseURL since it seemed to be stripping parts of URLs in some cases (bug 1411) --- diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 9363998d08..45bc7f00ff 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -2165,14 +2165,15 @@ HTMLArea.getHTML = function(root, outputRoot, editor) { HTMLArea.prototype.stripBaseURL = function(string) { 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); string = string.replace(basere, ""); // strip host-part of URL which is added by MSIE to links relative to server root - // commented out for moodle - //baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1'); + baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1'); basere = new RegExp(baseurl); return string.replace(basere, ""); };