Reputation: 95
I have an Python string that looks like this:
patternBackground = 'background-color:#1CA2FF; background-image:url("data:image/svg+xml, ...
that I'm trying to render in a Jinja template as an inline html style:
style="{{patternBackground}}"
The problem is that the style gets cut off by it's first quotation mark so all that renders is..
background-color:#1CA2FF; background-image:url(
I've tried to escape the quotation marks in the Python string, this still doesn't work.
Any ideas on how I can encode this or pass the style string through as one whole thing (that isn't prematurely cut off)
Appreciate any help!
Isaac
Upvotes: 0
Views: 598