How can Z͎̠͗ͣḁ̵͙̑l͖͙̫̲̉̃ͦ̾͊ͬ̀g͔̤̞͓̐̓̒̽o͓̳͇̔ͥ text be prevented?

前端 未结 5 1121
独厮守ぢ
独厮守ぢ 2020-12-25 13:48

I\'ve read about how Zalgo text works, and I\'m looking to learn how a chat or forum software could prevent that kind of annoyance. More precisely, what is the complete set

5条回答
  •  心在旅途
    2020-12-25 14:30

    Using PHP and the mindset of a demolition worker you can get rid of the Zalgo with the iconv function. Of course that will kill any other UTF-8 chars too.

    $unZalgoText = iconv("UTF-8", "ISO-8859-1//IGNORE", $zalgoText);
    

提交回复
热议问题