Closed botic closed 9 years ago
@botic thanks for the bug report. We will check that. I think it's a problem with the url regex we are using here https://github.com/wbkd/ddj-catalogue-backend/blob/master/src/controllers/submit.js
A complete URL regex: https://github.com/ringo/ringojs/blob/master/modules/ringo/utils/strings.js#L30
But I don't think you need this level of detail ;-)
The valid-url module seems to be suitable for this purpose. It's more maintainable than a copy-pasted regex, even if your code looks really good :D
It's actually a shame that the Joi library can't validate URIs. :-1:
@g-div yeah, that's strange. I found this article about url validation regex https://mathiasbynens.be/demo/url-regex . It seems that there are a lot of problems with validating urls.. I will check the valid-url module, thanks!1
@g-div ha! https://github.com/hapijs/joi/pull/457
Jup, I had already seen the pull request and the related bugs, but the pull request isn't merged with master yet. :disappointed:
fixed. We are now using https://github.com/DavidTPate/isuri in order to validate URIs
Will man eine URL einreichen, die ein Hash enthält, so kommt die Fehlermeldung: "Bitte geben Sie eine gültige URL an."
Beispiel: http://orf.at/wahl/eu14/ergebnisse/#ergebnisse