Menu

#144 schema.org elements such as meta and link are removed

v2.14
closed-fixed
nobody
None
5
2015-08-24
2015-07-02
Haadar
No

tags such as meta and link are marked in the default tag provider as belongs to head.
this is incorrect. these tags can be used as part of the schema.org item descriptions.
for anyone with this issue you can solve it by changing the default tagprovider instance.
private val htmlcleanerTagProvider = {
DefaultTagProvider.INSTANCE.getTagInfo("meta").setBelongsTo(BelongsTo.HEAD_AND_BODY);
DefaultTagProvider.INSTANCE.getTagInfo("link").setBelongsTo(BelongsTo.HEAD_AND_BODY);
DefaultTagProvider.INSTANCE
}
and then feeding it to the cleanr constructor HTMLCLeaner(htmlcleanerTagProvider)

Discussion

  • Scott Wilson

    Scott Wilson - 2015-07-02

    Thanks Haadar,

    Yes as of HTML5, meta is allowed inside body. Likewise link where it has an itemprop attribute.

    We can change the Html5TagProvider to make this the default.

    S

     
  • Scott Wilson

    Scott Wilson - 2015-07-02
    • status: open --> open-accepted
    • Group: v 2.7 --> v2.14
     
  • Scott Wilson

    Scott Wilson - 2015-07-02

    Tagging to address in 2.14

     
  • Scott Wilson

    Scott Wilson - 2015-08-24
    • status: open-accepted --> closed-fixed
     
  • Scott Wilson

    Scott Wilson - 2015-08-24

    This has now been set to the default behaviour for HTML5 in HC

     

Log in to post a comment.