Shopify / Shopify/liquid

escape all outputted variables by default

Open
#1,240 1 comment 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

Would it be possible to configure liquid to make escaping opt out instead of opt in with the escape filter?

We have had problems with escaping being missed when implementing. If it escapes everything by default its harder to miss and you make an active choice to not escape potentially risky outputs.

React for example escape all output by default

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the escape filter documentation linked in the issue, then trace how Liquid currently handles rendered output and configuration. The issue names no source files or tests, so first clarify the opt-out configuration and expected behavior; done means default output is escaped while an explicit opt-out remains possible and is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.