Skip to content

Instantly share code, notes, and snippets.

@koduki
Created October 13, 2013 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koduki/6964539 to your computer and use it in GitHub Desktop.
Save koduki/6964539 to your computer and use it in GitHub Desktop.
package models.utils
object HtmlUtils {
def tidyUp(html: String): String = {
import org.jsoup._
val document = Jsoup.parse(html);
document.html()
}
def tidyUp(html: play.api.templates.Html): play.api.templates.Html = {
play.api.templates.Html(tidyUp(html.toString))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment