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

Implemented auto-escape functionality and provided a default escape replacer for HTML. #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dop251
Copy link

@dop251 dop251 commented Jul 28, 2022

This pull request adds auto-escape functionality which is similar to implicitly applying a filter to the output of an expression block, but done in a slightly efficient way (using a mechanism similar to strings.Replacer which allows for streaming processing without excessive memory allocations).

I know this functionality is not part of liquid (there is an open issue which doesn't have any responses at the time of writing), but I think this is an extremely useful feature and it does not break any existing functionality.

Checklist

  • I have read the contribution guidelines.
  • make test passes.
  • make lint passes.
  • New and changed code is covered by tests.
  • Performance improvements include benchmarks.
  • Changes match the documented (not just the implemented) behavior of Shopify.

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

Successfully merging this pull request may close these issues.

1 participant