• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 07: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
Apple Certified Associate Mac Integration & Management 10.10
epickris.com
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.