Skip to content
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

escape_once filter is broken #283

Closed
fw42 opened this issue Nov 29, 2013 · 11 comments
Closed

escape_once filter is broken #283

fw42 opened this issue Nov 29, 2013 · 11 comments

Comments

@fw42
Copy link
Contributor

fw42 commented Nov 29, 2013

The escape_once filter is passing tests, but is broken in templates.

>> Liquid::Template.parse('{{ "<strong>" | escape_once }}').render
=> "<strong>"

I assume that this is because the filters are set up in a different way in the tests than they are in strainer (and then in the real-thing, "ActionView::Helpers::TagHelper" raises a NameError). The whole NameError thing is super ugly. I would rather not define the filter at all if it's not available rather than returning the unescaped input.

@gauravmc, wanna take a look?

@fw42
Copy link
Contributor Author

fw42 commented Nov 29, 2013

I don't think this ever worked in the first place o_O

@parkr
Copy link
Contributor

parkr commented Nov 29, 2013

@fw42 What kind of escape, URI or CGI?

@fw42
Copy link
Contributor Author

fw42 commented Nov 29, 2013

See the code. It's using ActionView::Helpers::TagHelper.escape_once under the hood.

@nickpearson
Copy link
Contributor

In case it helps, I thought I'd point out that there's some more discussion on this in #110.

@fw42
Copy link
Contributor Author

fw42 commented Nov 30, 2013

Yeah the thing with the current implementation is that even IF the dependencies are loaded, it doesn't work.

@fw42
Copy link
Contributor Author

fw42 commented Jan 7, 2014

Fixed in #287

@fw42 fw42 closed this as completed Jan 7, 2014
@aprescott
Copy link

Are there plans to include this in a 2.x release?

@fw42
Copy link
Contributor Author

fw42 commented May 5, 2014

@aprescott: Not really. The 2.x branches are not being worked on anymore.

@aprescott
Copy link

@fw42 in that case is the 3.x branch going to see a release any time soon? It'd be great to have this fix included.

@fw42
Copy link
Contributor Author

fw42 commented May 5, 2014

@aprescott: We don't have a date set or anything. We are working on some refactorings (mostly for performance improvements and just general code quality) that we would like to see included.

@aprescott
Copy link

@fw42 👍 thanks, just curious, it'd be great to get this fix available. :)

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

No branches or pull requests

4 participants