Remove breaklines from content when generate the slug

This commit is contained in:
Diego Najar 2018-08-26 13:39:13 +02:00
parent c8f4bfe09e
commit 41fae2f808
1 changed files with 2 additions and 0 deletions

View File

@ -606,6 +606,8 @@ class Pages extends dbJSON {
// Returns string without HTML tags and truncated
private function generateSlug($text, $truncateLength=60) {
$tmpslug = Text::removeHTMLTags($text);
// Remove break lines
$tmpslug = str_replace(array("\r", "\n"), '', $tmpslug);
return Text::truncate($tmpslug, $truncateLength, '');
}