Remove breaklines from content when generate the slug
This commit is contained in:
parent
c8f4bfe09e
commit
41fae2f808
|
@ -606,6 +606,8 @@ class Pages extends dbJSON {
|
||||||
// Returns string without HTML tags and truncated
|
// Returns string without HTML tags and truncated
|
||||||
private function generateSlug($text, $truncateLength=60) {
|
private function generateSlug($text, $truncateLength=60) {
|
||||||
$tmpslug = Text::removeHTMLTags($text);
|
$tmpslug = Text::removeHTMLTags($text);
|
||||||
|
// Remove break lines
|
||||||
|
$tmpslug = str_replace(array("\r", "\n"), '', $tmpslug);
|
||||||
return Text::truncate($tmpslug, $truncateLength, '');
|
return Text::truncate($tmpslug, $truncateLength, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue