CodeIgniter Forums
Improvement to url helper's url_title() method - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Improvement to url helper's url_title() method (/showthread.php?tid=68350)



Improvement to url helper's url_title() method - krystian2160 - 06-27-2017

url_title()
Returns:
URL-formatted string


Not exactly.

Because it allows polish signs.


url_title('śśś ććć żżż', '-', TRUE);

produces

śśś-ććć-żżż

It's not correctly URL-formatted string if there are polish signs which ale not allowed in URL


RE: Improvement to url helper's url_title() method - EpicKris - 06-27-2017

(06-27-2017, 06:18 AM)krystian2160 Wrote: url_title()
Returns:
URL-formatted string


Not exactly.

Because it allows polish signs.


url_title('śśś ććć żżż', '-', TRUE);

produces

śśś-ććć-żżż

It's not correctly URL-formatted string if there are polish signs which ale not allowed in URL

Perhaps an extra parameter such as `convertSpecialChars` that defaults to `true` could be added to the `url_title()` function, so that when true it converts characters such as "ś" to "s", "ć" to "c" and "ż" to "z"?