mdex icon indicating copy to clipboard operation
mdex copied to clipboard

Issue with HTML conversion when using render: [unsafe: true]

Open ibnteo opened this issue 2 months ago • 3 comments

Description

MDEx.to_html!("<b>test</b> &lt;b&gt;test2&lt;/b&gt;", render: [unsafe: true])

The result of this code should be:

"<p><b>test</b> &lt;b&gt;test2&lt;/b&gt;</p>"

But currently it returns:

"<p><b>test</b> <b>test2</b></p>"

ibnteo avatar Oct 25 '25 19:10 ibnteo

Hi @ibnteo how problematic is that for you right now? I'm working on a feature that would fix that issue but it may take a couple weeks to release, or a quicker workaround if that's really a blocking issue for you (but I'd like to avoid such workaround).

leandrocp avatar Oct 27 '25 16:10 leandrocp

It's not important right now, I've written a simple Rustler wrapper around comrak for myself, and it works incredibly fast without any unnecessary conversions. But if there's a bug, it would be good to fix it in the future.

ibnteo avatar Oct 28 '25 10:10 ibnteo

Cool, I'll keep it open. Will be fixed soon.

leandrocp avatar Oct 28 '25 12:10 leandrocp