You are not logged in.
Pages: 1
I had this problem in IE with the baseURL being attached to any link I made not containing http://
So when I created any link IE prepended http://localhost/ to it (as long as http:// wasn't in). This, obviously, is a test on my localhost but the problem also occurred on the online domain.
Now I found a part in the code that handles this (HTMLArea.prototype.stripBaseURL) but it was not functional the way I expected it.
After putting in some alert statements I found out why the url was not transformed because alert(string.replace(basere, "")); returned "http://null/index.php" rather then the displayed "http://localhost/index.php" in the textarea. Well it may be obvious that after finding the problem I took the path of the least resistance and changed the basere variable to "http://null/" which indeed fixed the entire problem.
I do not know why this problem occurs at all as the comments suggest this code is meant to fix the problem allready so that's why I am asking if someone can explain this to me. So this is not a bug report yet; I'll add that if people here can confirm this is in fact a bug and not something wrong on my side. The changed version of the disfunctional function is added below.
Anybody??
HTMLArea.prototype.stripBaseURL = function(string) {
var baseurl = this.config.baseURL;
// 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
baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1');
basere = new RegExp(baseurl);
basere = 'http://null/';
return string.replace(basere, "");
};
Offline
*kick*
I take it nobody ever noticed this, nobody knows anything about this and it is just me
Offline
Pages: 1