View on GitHub

podinfra.net

Best practices for podcasting's open infrastructure

Sanitise form input

Removing errors when a user enters information can help avoid un-needed support queries later.

In PHP, the following code will trim and remove double-spaces:

$str = preg_replace('/ {2,}/', ' ', trim($input));

Page authors: jamescridland

Site authors: James Cridland Evo Terra