htmlxhtmlmarklogichtmltidysjs

xdmp.tidy(html) removes useful Article tags


I'm using Marklogic 8. While using xdmp.tidy() to clean and convert HTML to XHTML, it deletes useful "article" tags.

Any fix or options to ignore few tags? Do we have other alternative conversion technique?

Things Already checked:


Solution

  • We can add new HTMl5 tags using tidy options.

    var options = {"newBlocklevelTags":"article section"};
    var cleanHtml=xdmp.tidy(html, options);