hey guys im really frustrated
im looking for a way to retrieve back my slug to the normal text as wordpress does
in wordpress there is a function to do so :
apply_filters(‘editable_slug’, $slug)
i search all related files to find what this function does, but couldn’t understand a bit.
as ypu may know , making a slug out of a normal text is a easy job , but when its converted , for Utf-8 languages such as Arabic , words will be changed to unreadable unicodes .
e.g. :
http://localhost/page/%d8%a7%d9%84%d9%84%d9%87
do you know how this function works in wordpress ?
apply_filters(‘editable_slug’, $slug)
and how i can do the same in my own php project ?
Call rawurldecode on the percent-encoded form — this will give you the text in UTF-8 encoding. If your webpage encoding is UTF-8, you just have to call htmlspecialchars($str, ENT_NOQUOTES, ‘UTF-8’).
Example: