-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special characters in GPX track name #269
Comments
Now that we have escape functions in StringUtils (abrensch/brouter#201, #194), we should use those for the track name also, i.e. not apply the regex in ServerHandler.formatTrack, but escape the name in each Don't know if there is a recommended set of characters to remove from file names that works for all operating systems and cases, that we could use instead of allowing just a strict set of characters for the download file name in ServerHandler.getFileName (see also #202). |
Is there really a need for escaping there? Something like
works perfectly fine in Firefox and yields a download window for a file named |
I don't know. @bagage ?
Would be great and make sense if browsers removed special/unallowed characters in file names. But to be sure we should do some research if that is a MUST in a spec supported by all browsers. Note that we don't use the |
Not sure either. According to RFC,
So basically no escaping seems required. |
Now with client-side download, Spec quotes regarding the
HTMLAnchorElement.download - Web APIs | MDN
download attribute - 4.6.2 Links created by a and area elements - HTML Standard
as a download - 4.6.5 Downloading resources - HTML Standard So I think it's safe to remove our filename replacement and to rely on the browser to sanitize, assuming they do follow when "strongly urged". The still available old server download will keep replacing the name in the server (just no WYSIWYG anymore). Already implemented (7aa2fcb) and released. |
Hi,
It seems when exporting a GPX track the name can contain special characters, whereas the validation regex does not allow them. I don't think there could be issues allowing them, so the regex should probably be updated to take them into account.
E.g. : http://brouter.de/brouter-web/#map=13/47.7284/-3.4361/CyclOSM&lonlats=-3.472018,47.71177;-3.467302,47.721397;-3.455973,47.737273;-3.399582,47.75698;-3.433828,47.745672;-3.44636,47.721081;-3.468418,47.713631
Thanks!
The text was updated successfully, but these errors were encountered: