yogthos / Selmer

A fast, Django inspired template system in Clojure.
Eclipse Public License 1.0
985 stars 114 forks source link

Fix allowing whitespace in filters when parsing a file #295

Closed NoahTheDuke closed 2 years ago

NoahTheDuke commented 2 years ago

A follow-up to #261.

render-file calls parse with parse-file as the parse-fn, which calls preprocess-templates, which does additional validation that parse-input does not. As written, the tag {{ foo | safe }} is split and turned into the keyword : safe, which won't match the expected :safe, so calling trim here fixes that bug.

yogthos commented 2 years ago

Thanks, just pushed out 1.12.54 with the fix.

NoahTheDuke commented 2 years ago

What quick turnaround! Thank you! Didn't even get a chance to commit a workaround in my codebase hah.

yogthos commented 2 years ago

You did all the work. :)