Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a problem with malformed XHTML output

  • Loading branch information...
commit 9c51c3be992d96be05f720a3ba141e1d4d0b890b 1 parent bb9b8a1
@dpp dpp authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 web/webkit/src/main/scala/net/liftweb/http/HtmlProperties.scala
View
10 web/webkit/src/main/scala/net/liftweb/http/HtmlProperties.scala
@@ -295,14 +295,14 @@ final case class OldHtmlProperties(userAgent: Box[String]) extends HtmlPropertie
(docType -> encoding) match {
case (Full(dt), Full(enc)) if dt.length > 0 && enc.length > 0 =>
if (LiftRules.calcIE6ForResponse() && LiftRules.flipDocTypeForIE6) {
- Full(dt + "\n" + enc + "\n")
+ Full(dt.trim + "\n" + enc.trim + "\n")
} else {
- Full(enc + "\n" + dt + "\n")
+ Full(enc.trim + "\n" + dt.trim + "\n")
}
- case (Full(dt), _) if dt.length > 0 => Full(dt + "\n")
+ case (Full(dt), _) if dt.length > 0 => Full(dt.trim + "\n")
- case (_, Full(enc)) if enc.length > 0=> Full(enc + "\n")
+ case (_, Full(enc)) if enc.length > 0=> Full(enc.trim + "\n")
case _ => Empty
}
@@ -334,7 +334,7 @@ final case class Html5Properties(userAgent: Box[String]) extends HtmlProperties
def htmlWriter: (Node, Writer) => Unit =
Html5.write(_, _, false, !LiftRules.convertToEntity.vend)
- def htmlOutputHeader: Box[String] = docType.map(_ + "\n")
+ def htmlOutputHeader: Box[String] = docType.map(_.trim + "\n")
val html5FormsSupport: Boolean = {
val r = S.request openOr Req.nil
Please sign in to comment.
Something went wrong with that request. Please try again.