Purpose of using esc_url
-
I don’t understand why we need to use the esc_url if I myself am the one who actually wrote the URL like:
echo get_template_directory_url . '/someText'
Although the
/someText
is hardcoded but I know it’s clean and safe because I wrote it. What are the circumstances that this will be unsafe (like how do bad guys do bad things when I don’t use theesc_url
in this case? Do they hack into the server? If they can really hack into the server, they won’t even bother the esc_url already?I have referred to https://stackoverflow.com/a/30583251/19507498 , but he just explain how we use it without explaining why we need it.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Purpose of using esc_url’ is closed to new replies.