Data sanitization: Best Practices with code examples
This codex page explains it pretty well I think. The most important and commonly used function is probably esc_attr. Take this example: <a href=”https://wordpress.stackexchange.com/questions/48660/<?php print $author_url; ?>” title=”<?php print $author_name; ?>”> <?php print $author_name; ?> </a> If $author_name contains a ” character you get your attribute closed, and if that character is followed by onclick=”do_something();” … Read more