AtlasOfLivingAustralia / image-service

Image repository and tiling services
https://images.ala.org.au
0 stars 17 forks source link

exportDataset doesn't filter out new lines from fields correctly #157

Closed sbearcsiro closed 3 years ago

sbearcsiro commented 3 years ago

The export dataset function is supposed to filter out new lines but the regex to replace newline characters is wrong so it doesn't actually work.

The regex to replace with the empty string is currently: \\P{Cc}\\P{Cn}\\P{Cs}\\P{Cf} but it should be something like [\\p{Cc}\\p{Cn}\\p{Cs}\\p{Cf}] to achieve the goals of filtering out the various character classes.

sbearcsiro commented 3 years ago

159 doesn't actually fix this because PostgreSQL doesn't support the Unicode character categories used in the regex