xdmp.tidy(html) removes useful Article tags

52 Views Asked by At

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:

1

There are 1 best solutions below

1
Pavan Sky On BEST ANSWER

We can add new HTMl5 tags using tidy options.

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