Skip to content

Commit f6286ac

Browse files
authored
Merge pull request #2883 from jreklund/url_title
Build Your First Application used url_title incorrectly
2 parents f310c91 + 07c9d3c commit f6286ac

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

system/Helpers/url_helper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,6 @@ function url_title(string $str, string $separator = '-', bool $lowercase = false
601601
$str = strip_tags($str);
602602
foreach ($trans as $key => $val)
603603
{
604-
// $str = preg_replace('#'.$key.'#i'.( UTF8_ENABLED ? 'u' : ''), $val, $str);
605604
$str = preg_replace('#' . $key . '#iu', $val, $str);
606605
}
607606

user_guide_src/source/tutorial/create_news_items.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ validation <../libraries/validation>` library to do this.
6161
{
6262
$model->save([
6363
'title' => $this->request->getVar('title'),
64-
'slug' => url_title($this->request->getVar('title')),
64+
'slug' => url_title($this->request->getVar('title'), '-', TRUE),
6565
'body' => $this->request->getVar('body'),
6666
]);
6767

0 commit comments

Comments
 (0)