Opened 4 years ago
Last modified 4 years ago
#19616 new enhancement
Better handling of zero-width space (\u200b) in URL
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | tested |
Keywords: | validator, url | Cc: |
Description
The URL validator generates a warning for valid URLs e.g.
https://www.9round.ca/fitness/Vaughan-ON-x0298 It generates the warning "URL validator - 'website': URL contains an invalid path: /fitness/Vaughan-ON-x0298". I am using JOSM 16812 on Windows 10.
There appears to be a bug in isValidPath in src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
Attachments (0)
Change History (4)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
We could check for white spaces in values for some keys like [*:]website
and [*:]url
.
Not sure if a autofix is useful as it is not clear if it needs to be removed or changed to e.g. underscore.
Watch out for white spaces after semi-colon in cases of multiple values.
comment:3 by , 4 years ago
Priority: | minor → normal |
---|---|
Summary: | URL validator flags valid URLs as invalid → Better handling of zero-width space (\u200b) in URL |
Type: | defect → enhancement |
It turns out that the URL contains a zero-width space \u200b:
https://www.9round.ca/\u200b/fitness/\u200bVaughan-ON-x0298
So it looks like the validator is working correctly. The error message is not at all obvious though, since the zero-width space is not visible.