tilt icon indicating copy to clipboard operation
tilt copied to clipboard

Support UNSAFE commonmarker option

Open tcrouch opened this issue 5 years ago • 3 comments

Accept :UNSAFE options for commonmarker config.

Behaviour was changed to SAFE by default: gjtorikian/commonmarker#87 gjtorikian/commonmarker#81

tcrouch avatar Nov 04 '19 10:11 tcrouch

A better solution would be to honor the :escape_html option so the user can choose. See https://github.com/rtomayko/tilt/blob/master/docs/TEMPLATES.md#escape_html--truefalse

binford2k avatar Dec 19 '19 23:12 binford2k

@binford2k the user can always choose to pass :UNSAFE as an option. That's the point of this patch actually (since only :SAFE can be passed so far).

That said, we could simply add :escape_html as an option alias to :UNSAFE, the way :smartypants is already an alias to :SMART.

raphink avatar Jan 20 '21 09:01 raphink

Ah actually, :escape_html would not behave the same way. :UNSAFE allows HTML altogether, and the default behavior is to remove HTML entirely. It doesn't seem like Commonmarker supports escaping HTML.

raphink avatar Jan 20 '21 09:01 raphink

Looks like this was already implemented by e7432c54338f54c9e432282a83a6b6b3deb10f77, and can be closed.

jeremyevans avatar Aug 03 '22 17:08 jeremyevans