Ticket #487 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

[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

Changed 8 years ago by gogo

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

Changed 7 years ago by wymsy

  • status changed from new to closed
  • resolution set to fixed

changeset:502

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

Changed 7 years ago by wymsy

  • status changed from closed to reopened
  • resolution deleted

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?

Changed 7 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 :)

Changed 7 years ago by wymsy

  • status changed from reopened to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.