dbdev icon indicating copy to clipboard operation
dbdev copied to clipboard

docs: support github markdown

Open kiwicopple opened this issue 2 years ago • 2 comments

Chore

Describe the chore

dbdev deoesn't support all of gh flavored markdown:

image

Additional context

https://database.dev/kiwicopple/supa_audit

from this extension:

https://github.com/supabase/supa_audit

kiwicopple avatar Jan 07 '24 20:01 kiwicopple

Looks like raw html is not supported currently. If I add set skipHtml={true} in the props of the ReactMarkdown component, the above README renders correctly. But this sounds dangerous because it might open up possibility of XSS attacks. Although I couldn't get it to render a <script> tag, so it does filter out some tags. @alaister do you know how safe will it be to set skipHtml={true}?

imor avatar Jan 08 '24 10:01 imor

Yes, I think skipHtml seems to be only for trusted environments: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#appendix-a-html-in-markdown

I'll investigate what the proper method is here.

alaister avatar Jan 09 '24 04:01 alaister