AtlasOfLivingAustralia/image-service

exportDataset doesn't filter out new lines from fields correctly

Closed this issue · 1 comments

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.

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