Add leading/trailing spaces tests to misc.php