-
Notifications
You must be signed in to change notification settings - Fork 21
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
Comments
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? |
3.0.0-alpha.4, just one single string, thanks |
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. |
I’m using a (Swift) QR code generator to create an SVG string that I’d like to embed inside a div.
Would parsing the SVG string into HTMLKit types be an option?
Thanks!
|
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. |
Thanks, yes I'll try parsing the output to get the path and passing that in. Thanks for your help! |
This might help you: Link |
Apologies if I've missed it, but how do we specify that a string should not be escaped when rendered?
The text was updated successfully, but these errors were encountered: