Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Image Checking should ignore query string on Control.Window.open

#39

Around line 291 of window.js there is this line in the open function:


if(this.href.match(/\.(jpe?g|gif|png|tiff?)$/i)){

The problem with this is if you have the href of the source container that has a query string. The query string should not count when determining if the link is to an image. This especially fails if the query string ends with .gif, .jpeg, or .tiff.

here is an example that fails:


href=/admin/products/tagcontent?url=images%2F30.gif

Control.Window thinks the above is a link to an image when it is actually a link to a dynamic script.

A simple fix is to change the above javascript code to:


var hrefCheck = this.href.replace(/\?(.)*$/,'');
if(hrefCheck.match(/\.(jpe?g|gif|png|tiff?)$/i)){

Reported by Derek · December 29th, 2008 @ 04:42 PM

State: invalid
Milestone: 1.0
Assigned to: Ryan Johnson Ryan Johnson

Activity

  1. Nathan L Smith
    Nathan L Smith
    • Tag set to control.window, patch
    • State changed from unconfirmed to confirmed

    May 18th, 2009 @ 04:47 PM

  2. Nathan L Smith

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.