Changeset 502


Ignore:
Timestamp:
04/30/06 22:49:36 (8 years ago)
Author:
wymsy
Message:

fix for ticket #487

I had put this patch in the GetHtml plugin in changeset:478, but it really belongs in the core.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r500 r502  
    51595159  if ( typeof this.config.stripSelfNamedAnchors != 'undefined' && this.config.stripSelfNamedAnchors ) 
    51605160  { 
    5161     var stripRe = new RegExp(document.location.href.replace(HTMLArea.RE_Specials, '\\$1') + '(#[^\'" ]*)', 'g'); 
     5161    var stripRe = new RegExp(document.location.href.replace(/&/g,'&').replace(HTMLArea.RE_Specials, '\\$1') + '(#[^\'" ]*)', 'g'); 
    51625162    html = html.replace(stripRe, '$1'); 
    51635163  } 
  • trunk/plugins/GetHtml/get-html.js

    r478 r502  
    195195}; 
    196196 
    197 //fix obscure case; stripSelfNamedAnchors fails in IE if location.href includes a query string with '&' in it 
    198 HTMLArea.prototype._origFixRelativeLinks = HTMLArea.prototype.fixRelativeLinks; 
    199 HTMLArea.prototype.fixRelativeLinks = function(html) 
    200 { 
    201   if(typeof this.config.stripSelfNamedAnchors != 'undefined' && this.config.stripSelfNamedAnchors) 
    202   { 
    203     var stripRe = new RegExp(document.location.href.replace(/&/g,'&').replace(HTMLArea.RE_Specials, '\\$1') + '(#[^\'" ]*)', 'g'); 
    204     html = html.replace(stripRe, '$1'); 
    205   } 
    206   html = this._origFixRelativeLinks(html); 
    207   return html; 
    208 }; 
    209  
    210197//override (hack) outwardHtml() to handle onclick suppression 
    211198HTMLArea.prototype._origOutwardHtml = HTMLArea.prototype.outwardHtml; 
Note: See TracChangeset for help on using the changeset viewer.