Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Somewhere in your code the string is html encoded which turns ’ to #039; then at following step
$clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean);
characters # and ; are stripped and you end up with 039