def unsupportedAttributesRemoved()

in src/main/scala/managehelpcontentpublisher/HtmlToJson.scala [70:78]


  def unsupportedAttributesRemoved(e: Element): Element =
    Jsoup.parseBodyFragment(Jsoup.clean(e.clone().outerHtml, Safelist.relaxed())).body

  def emptyParagraphsRemoved(e: Element): Element = {
    val cleaned = e.clone()
    val emptyParas = cleaned.select("p:empty").asScala.toSet
    for (para <- emptyParas) para.remove()
    cleaned
  }