Rendering doesn't work with URL filters
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
I'm trying to use the link_to filter.
This is what I'm doing
body = "Click {{ 'HERE' | link_to: link, 'A link to google' }}"
liquid_template = Liquid::Template.parse(body).render('link' => 'www.google.com')
This is what I'm expecting as the output
Click <a href="www.google.com" title="A link to google">HERE</a>
However, I'm getting this
Click HERE
What am I doing wrong?
If it helps I'm on Liquid 4.0.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example with Liquid::Template.parse, the link_to filter, and Liquid 4.0.3. Compare the rendered result with the expected anchor output and determine whether the issue is in the example or in link_to rendering; done means the cause and required behavior are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100