use parse_url to verify dn, because filter_var has issues with special chars
Add test on adding bookmark with URL containing umlaut
Does not relate to this issue (different code path, not covered by tests
yet), but still it is a good addition.
- Fix protocol cut off bug
- Automatically attemps to upgrade existing URL from http to https if user add it a second time to bookmarks application (without specifying protocol)
Changed the way `addBookmark` function checks if url already exists.
Now the `addBookmark` function checks wether the url one want to bookmark exists or not, independantly from its protocol.
In order to achieve this, the script :
- Removes everything from the url before the `://` part (included)
- Uses a `like` statement in the SQL query instead of `=`
- Adds a `%` to the url at the query execution
Fix the http / https prefix requirement when adding a bookmark by :
1 - Constructing URLs for both protocols,
2 - Retrieving both pages titles,
3 - Choosing the one which works, with a systematic preference for https.
Dependency Injection for user and db is used througout the controllers
The Routing features a consistent rest api
The Routing provides some legacy routes, so that for exampe the Android Bookmarks App still works.
There is a publicly available api that provides access to bookmarks per user.
(This is usefull in connection with the WP Plugin https://github.com/mario-nolte/oc2wp-bookmarks)