Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw (unescaped) content #171

Open
jpenwith opened this issue Mar 26, 2025 · 7 comments
Open

Raw (unescaped) content #171

jpenwith opened this issue Mar 26, 2025 · 7 comments

Comments

@jpenwith
Copy link

Apologies if I've missed it, but how do we specify that a string should not be escaped when rendered?

@mattesmohr
Copy link
Member

Heya, which version of HTMLKit do you use? Do you want to unescape one single string, or do you want to disable the auto-escaping at all?

@jpenwith
Copy link
Author

3.0.0-alpha.4, just one single string, thanks

@mattesmohr
Copy link
Member

I’m afraid it’s not possible at the moment. I haven’t had the need to implement it yet, also due to security reasons. Could you expand a bit more on what you are trying to do? Maybe we can figure something out.

@jpenwith
Copy link
Author

jpenwith commented Mar 26, 2025 via email

@mattesmohr
Copy link
Member

I don't know the details of your generator. But in case the output is always the same and you have access to the path of that vector, you could do something like:

Vector {
   Path {
   }
   .draw("M...") // Paste the path in here
}
.namespace("http://...")
.viewBox("0 0 100 100")

If you want to go more into details we can discuss it on Discord https://discord.gg/mbtc39J2

You can also disable the auto-escaping at all and handle the escaping by yourself.

@jpenwith
Copy link
Author

Thanks, yes I'll try parsing the output to get the path and passing that in. Thanks for your help!

@mattesmohr
Copy link
Member

This might help you: Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants