Axure / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

-trans.png extension #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. rails calls with image_tag produce a source of
"picture-trans.png?1234567" for caching reasons

What is the expected output? What do you see instead?
IE7_PNG_SUFFIX can be assigned with a string

It would be better to have the possibility to assign IE7_PNG_SUFFIX with a
RegExp, in my case
IE7_PNG_SUFFIX = /-trans\.png(\?\d+)?$/i;

I suggest to change  
Version
ie7-2.0(beta3)

IE7.js
2183c2183
<   PNG = typeof IE7_PNG_SUFFIX == "object" ? IE7_PNG_SUFFIX : (new
RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ? IE7_PNG_SUFFIX :
"-trans.png") + "$", "i"));

---
>   PNG = new RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ?
IE7_PNG_SUFFIX : "-trans.png") + "$", "i");

and IE8.js

2579c2579
<   PNG = typeof IE7_PNG_SUFFIX == "object" ? IE7_PNG_SUFFIX : (new
RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ? IE7_PNG_SUFFIX :
"-trans.png") + "$", "i"));

---
>   PNG = new RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ?
IE7_PNG_SUFFIX : "-trans.png") + "$", "i");

Original issue reported on code.google.com by martin.k...@gmail.com on 23 Sep 2009 at 8:50

GoogleCodeExporter commented 9 years ago
I've fixed the way that the RegExp is created. It will now ignore the query 
string.

Original comment by dean.edw...@gmail.com on 10 Feb 2010 at 9:30

GoogleCodeExporter commented 9 years ago
I will also allow IE7_PNG_SUFFIX to be a RegExp.

Original comment by dean.edw...@gmail.com on 10 Feb 2010 at 9:36