Changeset 215


Ignore:
Timestamp:
06/03/05 06:21:12 (14 years ago)
Author:
niko
Message:

remove baseURL and use baseHref instead
see #297

i hope this doesn't break anything, pobably we need the 2nd patch in #297

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r204 r215  
    253253  // enable the 'Target' field in the Make Link dialog 
    254254  this.makeLinkShowsTarget = true; 
    255  
    256   // BaseURL included in the iframe document 
    257   this.baseURL = document.baseURI || document.URL; 
    258   if (this.baseURL && this.baseURL.match(/(.*)\/([^\/]+)/)) 
    259     this.baseURL = RegExp.$1 + "/"; 
    260255 
    261256  // CharSet of the iframe, default is the charset of the document 
     
    32983293  } 
    32993294  if (image) outparam = { 
    3300     f_base   : editor.config.baseURL, 
     3295    f_base   : editor.config.baseHref, 
    33013296    f_url    : HTMLArea.is_ie ? editor.stripBaseURL(image.src) : image.getAttribute("src"), 
    33023297    f_alt    : image.alt, 
     
    47274722}; 
    47284723 
    4729 HTMLArea.prototype.stripBaseURL = function(string) { 
    4730   var baseurl = this.config.baseURL; 
    4731  
    4732   // strip to last directory in case baseurl points to a file 
    4733   baseurl = baseurl.replace(/[^\/]+$/, ''); 
    4734   var basere = new RegExp(baseurl); 
    4735   string = string.replace(basere, ""); 
     4724HTMLArea.prototype.stripBaseURL = function(string) 
     4725{ 
     4726  if(this.config.baseHref==null || !this.config.stripBaseHref) 
     4727  { 
     4728    return(string); 
     4729  } 
     4730  var baseurl = this.config.baseHref; 
    47364731 
    47374732  // strip host-part of URL which is added by MSIE to links relative to server root 
Note: See TracChangeset for help on using the changeset viewer.