I've added following URL in my theme, but I have been informed that I must use esc_url()
. I could not figure out, how can I use that function with following code?
<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode( get_the_permalink() ); ?>&media=<?php echo urlencode($thumbnail); ?>&description=<?php echo urlencode( get_the_title() ); ?>" target="_blank">Pinterest</a>