lift / framework

Lift Framework
http://liftweb.net
Apache License 2.0
1.27k stars 279 forks source link

Don't covert entities in certain cases #1368

Open dpp opened 11 years ago

dpp commented 11 years ago

When the "don't convert entity" flag is passed to the Html5 writer... don't convert entities:

      case er: EntityRef if convertAmp =>
        HtmlEntities.entMap.get(er.entityName) match {
          case Some(chr) if chr.toInt >= 128 => writer.append(chr)
          case _ => {
            val sb = new StringBuilder()
            er.buildString(sb)
            writer.append(sb)
          }
        }

      case er: EntityRef =>
        val sb = new StringBuilder()
        er.buildString(sb)
        writer.append(sb)
Shadowfiend commented 7 years ago

Believe this happens in Html5Writer.writeAttributes, in addition to the quoted segment of Html5Writer.write.