Replies: 1 comment
-
Actually, I am able to just go
Which renders
And even though it seems rendered out Not sure if this is the "correct" method or not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am getting a bit tied up trying integrate a js click handler. I am using
6.0.rc-0
.I have an text suggestion that comes from my LiveView, when clicking it, it should adjust a form value. The HTML I am roughly looking to get is:
I want the "value" to be escaped when appropriate:
my name
->"my name"
m' name
->"m' name"
my "awkward" name
->"my \"awkward\" name"
(or even"my \\"awkward\\" name"
)I have tried what feels like every mixture and nesting of
Phoenix.HTML.raw
,Phoenix.HTML.javascript_escape
and manual escaping in combination withJason.encode!
, either around just the value or the whole string but I always get mis-escaped html that "bleeds" the string out (the literal\
are getting escaped themselves) or"
's in the javascript code.I've tried passing
#{interpolated_strings}
andio_list
s toraw
thinking it might be related to #121.I am sure there is an easy fix, it seems like all the pieces are there, just how to combine them is confusing. Any guidance?
Not quite sure it this is more appropriate as a Phoenix question or a Temple question, it is not so clear to me where the escaping is happening.
There was #10 but it seems
partial
is no longer in 6.0.Beta Was this translation helpful? Give feedback.
All reactions