Welcome Guest, Not a member yet? Register   Sign In
Save function
#4

(10-28-2019, 08:15 AM)edica Wrote: Yes, I understood. Very good.

Enjoying the post. A suggestion about url_title. It would be nice to remove other special characters.

return preg_replace(array("/(á|à|ã|â|ä)/","/(Á|À|Ã|Â|Ä)/","/(é|è|ê|ë)/","/(É|È|Ê|Ë)/","/(í|ì|î|ï)/","/(Í|Ì|Î|Ï)/","/(ó|ò|õ|ô|ö)/","/(Ó|Ò|Õ|Ô|Ö)/","/(ú|ù|û|ü)/","/(Ú|Ù|Û|Ü)/","/(ñ)/","/(Ñ)/"),explode(" ","a A e E i I o O u U n N"),$string);

There is some discussion about that going on over at Github. The biggest problem, though, is that according to the HTTP spec, those are valid characters and we can definitely see them being important in many locales so, for now, the decision has been to leave them alone. I believe we are going to ensure they get lower-cased, though.
Reply


Messages In This Thread
Save function - by edica - 10-26-2019, 10:32 AM
RE: Save function - by kilishan - 10-26-2019, 08:32 PM
RE: Save function - by edica - 10-28-2019, 08:15 AM
RE: Save function - by kilishan - 10-28-2019, 08:33 AM
RE: Save function - by edica - 10-29-2019, 05:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB