Yew: How do I place a   in html! marcro?

Created on 20 Sep 2018  路  4Comments  路  Source: yewstack/yew

html!{
    <div>{"&nbsp;"}</div>
}

This would show a div with &nbsp; literal in it instead of a non-breaking space.

How can I properly render this?

Most helpful comment

All 4 comments

Non-breaking space is a normal unicode character with its own escape sequence in Rust string literals. If you use that it will presumably be converted to the html escape sequence like everything else.

On September 20, 2018 11:05:51 AM GMT+02:00, FrontMage notifications@github.com wrote:

html!{
   <div>{"&nbsp;"}</div>
}

This would show a div with &nbsp; literal in it instead of a
non-breaking space.

How can I properly render this?

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/DenisKolodin/yew/issues/405

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

@untitaker {"U+00A0"} is not working. I assume I'm not supposed to use String in there?

Thank you, sir, perfectly solved. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jstarry picture jstarry  路  4Comments

IngwiePhoenix picture IngwiePhoenix  路  4Comments

ghost picture ghost  路  5Comments

wldcordeiro picture wldcordeiro  路  4Comments

nixpulvis picture nixpulvis  路  4Comments