#39 ✓invalid
Derek

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

Reported by Derek | December 29th, 2008 @ 04:42 PM | in 1.0

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)){

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/

High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.

People watching this ticket

Pages