Modal iframe broken for urls containing # as appended named anchor?

It appears that Control.Modal (v2.2.3) contains a regex that tries to identify named anchors in the href attribute and handle this case differently from regular urls.

<a href="#myNamedAnchor">LINK</a>

This regex appears to incorrectly capture urls appended with a named anchor like this:

<a href="http://www.example.com#myNamedAnchor">LINK</a>

The result is that iframe type modal windows with urls containing appended named anchors cause a js error: 'x has no properties' at line 180.

I have corrected this by changing line 27 from:

targetRegexp: /#(.+)$/,

to:

targetRegexp: /^#(.+)$/,

Anyone else have this problem or a better solution?

Posted October 18th, 2007 at 1:03pm by rojoho

Login or Register to Post