Skip to content

Commit

Permalink
Merge pull request #2883 from jreklund/url_title
Browse files Browse the repository at this point in the history
Build Your First Application used url_title incorrectly
  • Loading branch information
lonnieezell authored Apr 27, 2020
2 parents f310c91 + 07c9d3c commit f6286ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion system/Helpers/url_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ function url_title(string $str, string $separator = '-', bool $lowercase = false
$str = strip_tags($str);
foreach ($trans as $key => $val)
{
// $str = preg_replace('#'.$key.'#i'.( UTF8_ENABLED ? 'u' : ''), $val, $str);
$str = preg_replace('#' . $key . '#iu', $val, $str);
}

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/tutorial/create_news_items.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ validation <../libraries/validation>` library to do this.
{
$model->save([
'title' => $this->request->getVar('title'),
'slug' => url_title($this->request->getVar('title')),
'slug' => url_title($this->request->getVar('title'), '-', TRUE),
'body' => $this->request->getVar('body'),
]);

Expand Down

0 comments on commit f6286ac

Please sign in to comment.