I checked the HTML code of my webpage and validated it using Firefox's HTML Validator add-on, and I saw that it complaints about the href
attribute of a link, which contains Unicode characters, which are not URL encoded.
The current URL is:
<a href='/اخبار'>Persian News</a>
However, the validator wants it to be:
<a href='/%D8%A7%D8%AE%D8%A8%D8%A7%D8%B1'>Persian News</>
I've tested this link in almost every browser (even back to IE6). It works just fine. So, what is the problem here? Why should I encode it? Is validator out of date? What problem may I encounter of not URL encoding Unicode characters inside the href
attribute of an <a>
tag?
URLs can only be sent over the Internet using the ASCII character-set.
Usually, browser does the encoding for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With