Is it necessary to use esc_url with template tags such as get_permalink?
sanitizing have nothing to do with escaping, and escaping is not a cure to everything. The role of escaping is to convert a string to a proper HTML. What is a proper HTML representation of a string might depend upon the context and that is the reason you have several escaping functions esc_html,esc_url and esc_attr. … Read more