Ticket #487 (closed defect: fixed)
[patch] fixRelativeLinks does not work for SelfNamedAnchors in Internet Explorer
| Reported by: | xinha@… | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | Version 1.0 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | fixRelativeLinks SelfNamedAnchors anchor |
| Cc: |
Description
In the Internet Explorer the URL parameters of the actual location in the SelfNamedAnchors? (which get added by IE) are not removed by the 'fixRelativeLinks' function. It looks like the Problem are the '&' between the parameters. In the regex these are represented by a simple '&'. I was able to solve the problem by changing the 'fixRelativeLinks' function as follows:
if(typeof this.config.stripSelfNamedAnchors != 'undefined' && this.config.stripSelfNamedAnchors)
{
var stripReTmp = document.location.href.replace(HTMLArea.RE_Specials, '\\$1');
if(HTMLArea.isIE)
stripReTmp = stripReTmp.replace(/&/, '&');
var stripRe = new RegExp(stripReTmp + '(#[^\'" ]*)', 'g');
html = html.replace(stripRe, '$1');
}
Change History
Note: See
TracTickets for help on using
tickets.
