Incorrect remove newlines if use filter newlines_to_br
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
If you use the filter newline_to_br you are not cleaning correctly the CLFR as is done in strip_newlines
Its recomended to change line https://github.com/Shopify/liquid/blob/e83b1e415990894c9517f94a8c2020ff825da027/lib/liquid/standardfilters.rb#L298
to:
input.to_s.gsub(/\r?\n/, '<br />')
This will remove strange carriage character ^M
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
Inspect lib/liquid/standardfilters.rb at the referenced line and compare newline_to_br with strip_newlines. Verify the filter's handling of carriage returns in CRLF input; done means it no longer leaves a stray ^M character.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100