Permalink
Browse files

Fix an edge case for HTML5 -> ByteStream

  • Loading branch information...
1 parent c38dfa7 commit 2c601f41d38abe153dd19f32eff44d3e44b2efb6 @dpp dpp committed with fmpwizard Jun 11, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 core/util/src/main/scala/net/liftweb/util/HtmlParser.scala
@@ -52,6 +52,7 @@ trait Html5Writer {
str.charAt(pos) match {
case '"' => writer.append(""")
case '<' => writer.append("&lt;")
+ case '&' if str.indexOf(';', pos) >= 0 => writer.append("&amp;")
case c if c >= ' ' && c.toInt <= 127 => writer.append(c)
case c if c == '\u0085' =>
case c => {
@@ -86,6 +87,7 @@ trait Html5Writer {
str.charAt(pos) match {
case '"' => writer.append("&quot;")
case '<' => writer.append("&lt;")
+ case '&' if str.indexOf(';', pos) >= 0 => writer.append("&amp;")
case c if c >= ' ' && c.toInt <= 127 => writer.append(c)
case c if c == '\u0085' =>
case c => {

0 comments on commit 2c601f4

Please sign in to comment.