clay icon indicating copy to clipboard operation
clay copied to clipboard

escaping characters

Open genmeblog opened this issue 1 year ago • 7 comments

Currently only > and < are escaped in certain places, & and " (quotation) should also be added.

genmeblog avatar Jun 12 '24 10:06 genmeblog

@genmeblog thanks.

Could you give an example that behaves unexpectedly for you?

daslu avatar Jun 12 '24 21:06 daslu

(deleted comment to wrong issue)

daslu avatar Jun 12 '24 21:06 daslu

Zulip discussion: https://clojurians.zulipchat.com/#narrow/stream/422115-clay-dev/topic/images/near/444295831

daslu avatar Jun 12 '24 21:06 daslu

This breaks rendering:

(kind/md "&/<>\\*+-\"\'")

genmeblog avatar Jun 13 '24 07:06 genmeblog

Ok, the problematic char is \' (tick)

genmeblog avatar Jun 13 '24 07:06 genmeblog

Hiccup does this: https://github.com/weavejester/hiccup/blob/2.0.0-RC1/src/hiccup/util.clj#L80-L88

genmeblog avatar Jun 13 '24 07:06 genmeblog

Thanks.

version 2-beta11 filters more characters.

Leaving this open to figure out more carefully.

daslu avatar Jun 15 '24 19:06 daslu