Changeset 940 for trunk


Ignore:
Timestamp:
01/22/08 22:34:07 (11 years ago)
Author:
ray
Message:

#1130 baseHref not correctly treated -- new solution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r937 r940  
    705705   *  your absolute links, your external string might be some special code, say "{server_url}" 
    706706   *  an you say that the internal represenattion of that should be http://your.server/<br /> 
    707    *  Example:  <code>{'external_string' : 'internal_string'}</code><br /> 
     707   *  Example:  <code>{ 'html_string' : 'wysiwyg_string' }</code><br /> 
    708708   *  Default: <code>{}</code> (empty) 
    709709   *  @type Object 
    710710   */ 
    711   this.specialReplacements = {}; // { 'external_string' : 'internal_string' } 
     711  this.specialReplacements = {}; //{ 'html_string' : 'wysiwyg_string' } 
    712712 
    713713 /** Set to true if you want Word code to be cleaned upon Paste. This only works if  
     
    50285028    if ( typeof this.config.baseHref != 'undefined' && this.config.baseHref !== null ) 
    50295029    { 
    5030       baseRe = new RegExp( "((href|src|background)=\")(" + Xinha.escapeStringForRegExp(this.config.baseHref.replace(/\/[^\/]*$/, '/')) + ")", 'g' ); 
     5030      baseRe = new RegExp( "((href|src|background)=\")(" + Xinha.escapeStringForRegExp(this.config.baseHref.replace(/([^\/]\/)(?=.+\.)[^\/]*$/, "$1")) + ")", 'g' ); 
    50315031    } 
    50325032    else 
Note: See TracChangeset for help on using the changeset viewer.