WP-3401: Replace preg_replace with trim for the good.