X-Git-Url: https://git.cweiske.de/phinde.git/blobdiff_plain/fd98bb30be8970309c52d3fc3a1585d7454b370a..d8c39f2b0571b9734259b2f9dc218eed24412332:/src/phinde/Helper.php diff --git a/src/phinde/Helper.php b/src/phinde/Helper.php index 40ea751..312c5e5 100644 --- a/src/phinde/Helper.php +++ b/src/phinde/Helper.php @@ -30,5 +30,16 @@ class Helper } return 'http://' . $url; } + + public static function sanitizeTitle($str) + { + return trim( + str_replace( + array("\r", "\n", ' ', ' '), + array('', ' ', ' ', ' '), + $str + ) + ); + } } ?>