Opened 14 years ago

Closed 13 years ago

#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 (5)

comment:1 Changed 14 years ago by gogo

  • Milestone set to Version 1.0
  • Summary changed from fixRelativeLinks does not work for SelfNamedAnchors in Internet Explorer to [patch] fixRelativeLinks does not work for SelfNamedAnchors in Internet Explorer

comment:2 Changed 13 years ago by wymsy

  • Resolution set to fixed
  • Status changed from new to closed

changeset:502

Removes similar fix from the GetHtml? plugin and puts it in the core program where it belongs.

comment:3 Changed 13 years ago by wymsy

  • Resolution fixed deleted
  • Status changed from closed to reopened

I just discovered that the fix in changeset:502 was reversed a few hours later (without explanation) as part of changeset:505. Gogo, was that intentional, and is there a problem with the fix in 502?

comment:4 Changed 13 years ago by gogo

Sprry I don't think it was intentional wymsy, doesn't seem related to what that changeset was actually about. Feel free to replace that :)

comment:5 Changed 13 years ago by wymsy

  • Resolution set to fixed
  • Status changed from reopened to closed

Thank, gogo, closing this again with changeset:598.

Note: See TracTickets for help on using tickets.