79378512

Date: 2025-01-22 16:31:21
Score: 3.5
Natty:
Report link

Kevin Nelson's Answer Re: $string = preg_replace('/[^[:print:]]/', '', $string);

Is a PHENOMENAL and easier solution. I had encountered a UTF-8 No Break space after almost 10 years of never having seen that character.

Instead of working hard to black list new characters a simple white listing from Kevin Nelson was a life saver ! (This is confirmed to work on PHP 8.1)

Reasons:
  • Blacklisted phrase (2): was a life saver
  • No code block (0.5):
  • Low reputation (1):
Posted by: Bala