1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 01:25:01 +02:00

Fix RSS atom link. Improved default styling on linkwords. e107::url() can now generate full or absolute urls. Sef-URL generation no longer strips numbers from titles.

This commit is contained in:
Cameron
2015-04-08 00:16:03 -07:00
parent d128b52576
commit 605d4078ce
4 changed files with 27 additions and 16 deletions

View File

@@ -4280,10 +4280,10 @@ class eHelper
public static function title2sef($title, $type = null)
{
$title = str_replace(array("&",",","(",")"),'',$title);
$title = preg_replace('/[^\w\pL\s.]/u', '', strip_tags(e107::getParser()->toHTML($title, TRUE)));
$title = preg_replace('/[^\w\d\pL\s.]/u', '', strip_tags(e107::getParser()->toHTML($title, TRUE)));
$title = trim(preg_replace('/[\s]+/', ' ', str_replace('_', ' ', $title)));
$words = str_word_count($title,1);
$words = str_word_count($title,1, '12345678990');
$limited = array_slice($words, 0, 14); // Limit number of words to 14. - any more and it ain't friendly.