com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
758 stars 117 forks source link

Unicode characters #114

Closed mathieuleclaire closed 8 years ago

mathieuleclaire commented 8 years ago

Hi, I cannot use unicode characters like "✖" because the "&" character is always replaced by "&amp", which leads to a wrong string for my unicode as it can be seen in Escpaping.scala

How can I prevent from this ? Thanks Mathieu

stewSquared commented 8 years ago

@mathieuleclaire For now, you can say something like

div("Multiplication: 3 ", raw("&#2716"), " 4 == 12")

Where you might have said:

div("Multiplication: 3 &#2716 4 == 12")

In the longterm, scalatags should be changed not to escape & if it's followed by #.

mathieuleclaire commented 8 years ago

@stewSquared None of raw("&#2716"), raw("#2716"), raw("&2716"), "&2716", "&#2716" work for me. It still displays the content of the string itself without interpreting the unicode.

mathieuleclaire commented 8 years ago

Works with scala raw("&#215")