Hi,

When inside a modalframe I need to open links within the modalframe (node/edit etc) and inside child.jd there is a function that looks for "external links". However the function does not really seems to look for anything else than a "empty" href-attr OR a one that starts with a "#"(fragment).

To solve this I added a clause to the if-statment which also (and not) looks for:
* http (not)
* https (not)
* "/"

if (!href || href.length <= 0 || href.match(/^(http|https)/) == null && href.match(/^(#|\/|.)/))

I supplied a patch to be reviewed.

CommentFileSizeAuthor
child_js_fix_External_links.patch557 bytesbobodrone
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tobey_p’s picture

I think it would be a good idea to combine this patch with the patch over there, cause it adds to the same line of code:
http://drupal.org/node/1166990#comment-4838476

dsnopek’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Actually, it's not meant to look for "external URLs" - really, it's trying to find any 'a' tag that's a valid link to another URL. This could include relative URLs which won't start with http/https like your patch is checking for. To looks to be working as designed!