Changeset 992 for trunk


Ignore:
Timestamp:
04/12/08 21:02:13 (11 years ago)
Author:
ray
Message:

#1186 strip xinha_config.baseHref AND location.href from paths

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r990 r992  
    4545Xinha._resolveRelativeUrl = function( base, url ) 
    4646{ 
    47   if(url.match(/^([^:]+\:)?\//)) 
     47  if(url.match(/^([^:]+\:)?\/\//)) 
    4848  { 
    4949    return url; 
     
    50275027      baseRe = new RegExp( "((href|src|background|action)=\")(" + Xinha.escapeStringForRegExp(this.config.baseHref.replace(/([^\/]\/)(?=.+\.)[^\/]*$/, "$1")) + ")", 'g' ); 
    50285028    } 
    5029     else 
    5030     { 
    5031       baseRe = new RegExp( "((href|src|background|action)=\")(" +  Xinha.escapeStringForRegExp(document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' )) + ")", 'g' ); 
    5032     } 
     5029    baseRe = new RegExp( "((href|src|background|action)=\")(" +  Xinha.escapeStringForRegExp(document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' )) + ")", 'g' ); 
    50335030 
    50345031    html = html.replace(baseRe, '$1'); 
  • trunk/modules/InsertImage/insert_image.js

    r990 r992  
    7979    { 
    8080      f_base   : base, 
    81       f_url    : image.getAttribute('src',2), // the second parameter makes IE return the value as it is set, as opposed to an "interpolated" (as MSDN calls it) value 
     81      f_url    : this.stripBaseURL(image.getAttribute('src',2)), // the second parameter makes IE return the value as it is set, as opposed to an "interpolated" (as MSDN calls it) value 
    8282      f_alt    : image.alt, 
    8383      f_border : image.border, 
Note: See TracChangeset for help on using the changeset viewer.