Skip to content

Sanitize description in write_eml() #189

Description

@peterdesmet

mica-agouti version 1 has the following description in datapackage.json:

"description" : "<emphasis>MICA - Muskrat and coypu camera trap observations in Belgium, the Netherlands and Germany</emphasis> is a camera trap dataset published by the <ulink url=\"https://www.inbo.be/en\"><citetitle><Research Institute of Nature and Forest (INBO)</citetitle></ulink>. It is part of the LIFE project MICA, in which innovative techniques are tested for a more efficient control of muskrat and coypu populations, both invasive species. The dataset contains camera trap observations of muskrat and coypu, as well as many other observed species. Geospatial coordinates are rounded to 0.001 degrees. Issues with the dataset can be reported at https://github.com/inbo/camera-trap-datasets/issues\r\n\r\nThis dataset was collected using infrastructure provided by INBO and funded by Research Foundation - Flanders (FWO) as part of the Belgian contribution to LifeWatch. The data were collected as part of the MICA project, which received funding from the European Union’s LIFE Environment sub-programme under the grant agreement LIFE18 NAT/NL/001047. The dataset was published with funding from Stichting NLBIF - Netherlands Biodiversity Information Facility.",

This results in an error in write_eml():

Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
  Specification mandates value for attribute Institute [41]

I think we should sanitize the input of the description.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions