From d034765aeb60abc6be967f3498a9a929c800c957 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 17 May 2004 08:04:28 +0000 Subject: [PATCH] Added a line to disable this function: HTMLArea.prototype.stripBaseURL since it seemed to be stripping parts of URLs in some cases (bug 1411) --- lib/editor/htmlarea.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, ""); }; -- 2.39.5