How To Sanitize WordPress URLs

Share on facebook
Share on google
Share on twitter
Share on linkedin

When working with WordPress URLs it is best practice to always ensure they are properly formed and don’t contain any invalid or dangerous characters. The default WordPress esc_url() function lets you easily do just that.

$your_url = 'http://yourpage.com/?awesome=true';
   $url = esc_url( $your_url );

What Are Your Thoughts? Leave a Reply :)

About Me

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Recent Posts

Follow Us

Weekly Tutorial

Tips on Hacking Digital Business Growth

Reserve A Consultation