Closed mshannaq closed 10 months ago
Encoding URLs before displaying them as a link is crucial to ensure that the URLs are properly formatted and safe for use in various contexts, especially in web applications. Here are some reasons why URL encoding is necessary:
Original URL: https://example.com/search?query=hello world
Encoded URL: https://example.com/search?query=hello%20world
we shoud store the url as is in database
So we must not touch the URLS.
The url stoered in db as encoded format.
this will show the url in encoded format like this:
we must make sure to decode it before show. in view url page and in url hits list page. or we can store it in database with decoded format.