I've read Professional WordPress and it says:
esc_html
function is used for scrubbing data that contains HTML. This function encodes special characters into their HTML entities
esc_attr
function is used for escaping HTML attributes
esc_url
. This function should be used to scrub the URL for illegal characters. Even though the href is technically an HTML attribute
What's the difference between these?
If I have
<script>alert('hello world!');</script>this is some content
Would all < >
be converted to < >
? Will the URL be something like %xxx
?