Allow cmark --unsafe flag? #46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
New user of BSSG here and really enjoying thus far. I'm trying to add some custom attributes to my images so that I can utilise some fun JS libraries (https://github.com/sneas/img-comparison-slider) on my site. The requires HTML is this:
But I can't work out how to generate the required HTML via the .md -> cmark build process, and I keep seeing
<!-- raw HTML omitted -->in my output files. I see that passing the--unsafeflag to the cmark command allows the embedded html to pass through. Would it be possible to enable this as a local configuration option perhaps? Or does it present security issues that I'm not aware of?Cheers,
I solved this by creating an alias to cmark with the unsafe flag always on.
Ah, nice workaround! Thanks. Guess I might leave the issue open for a bit in case passing flags to the parsing tools is something worth exploring?
@mrecondo wrote in #46 (comment):
Actually, I can't figure out how to do this on macosx.
./bssg.shcalls a non-interactive shell via/usr/bin/env bashand none my aliases seem to take effect. Any advice?I haven't used macos for a long time. No idea how to solve this. Sorry
Resorted to changing ln 320 from
/scripts/build/content.shfrom:if ! html_content=$(echo "$content" | cmark); thento
if ! html_content=$(echo "$content" | cmark --unsafe); thenhacky and unsustainable but did the job for now.