Welcome Guest, Not a member yet? Register   Sign In
Improvement to url helper's url_title() method
#1

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
Reply
#2

(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"?
Kristian Matthews-Kennington
Apple Certified Associate Mac Integration & Management 10.10
Reply




Theme © iAndrew 2016 - Forum software by © MyBB