New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strictEncodeURIComponent fails in FF 3.6 #91

Closed
NetForce1 opened this Issue May 22, 2013 · 7 comments

Comments

Projects
None yet
2 participants
@NetForce1

NetForce1 commented May 22, 2013

Calling strictEncodeURIComponent with some specific values cause an error in FF 3.6.

strictEncodeURIComponent('abcdefg()') // -> Error: invalid string escape mask 8

I hotfixed this by replacing the escape-function that is passed into replace with:

function(val) {return escape(val);}
@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm May 22, 2013

Member

Firefox 3.6, seriously? we're at 21. twentyone!

Member

rodneyrehm commented May 22, 2013

Firefox 3.6, seriously? we're at 21. twentyone!

@NetForce1

This comment has been minimized.

Show comment
Hide comment
@NetForce1

NetForce1 May 22, 2013

Sure, we don't like it either, but in one of our products we embed that browser (or xulrunner actually). And it's not that easy to upgrade.

NetForce1 commented May 22, 2013

Sure, we don't like it either, but in one of our products we embed that browser (or xulrunner actually). And it's not that easy to upgrade.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm May 22, 2013

Member

let me get this straight, your fix is replacing

.replace(/[!'()*]/g, escape)

with

.replace(/[!'()*]/g, function(v){return escape(v); })

and that's it?

Member

rodneyrehm commented May 22, 2013

let me get this straight, your fix is replacing

.replace(/[!'()*]/g, escape)

with

.replace(/[!'()*]/g, function(v){return escape(v); })

and that's it?

@NetForce1

This comment has been minimized.

Show comment
Hide comment
@NetForce1

NetForce1 May 23, 2013

yep, that's it. It seems like FF 3.6 has some limitations in accessing native functions, I suppose this issue: jashkenas/backbone#2417 falls into the same category.

NetForce1 commented May 23, 2013

yep, that's it. It seems like FF 3.6 has some limitations in accessing native functions, I suppose this issue: jashkenas/backbone#2417 falls into the same category.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm May 23, 2013

Member

well, that's easy enough. I'll include that in the next version

Member

rodneyrehm commented May 23, 2013

well, that's easy enough. I'll include that in the next version

@NetForce1

This comment has been minimized.

Show comment
Hide comment
@NetForce1

NetForce1 May 23, 2013

great, thanks!

NetForce1 commented May 23, 2013

great, thanks!

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Aug 3, 2013

Member

I've fixed this in master - it will be included in the next release. thank you for your help!

Member

rodneyrehm commented Aug 3, 2013

I've fixed this in master - it will be included in the next release. thank you for your help!

@rodneyrehm rodneyrehm closed this Aug 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment