FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Why Your Profanity Filter Fails Against Unicode (And How to Fix It)
How-ToWeb Development

Why Your Profanity Filter Fails Against Unicode (And How to Fix It)

via Dev.to WebdevMuhammad Arslan1mo ago

Most profanity filters only check raw input. That’s the problem. You can block fuck . But what about: fu\u0441k (Cyrillic “с” instead of Latin “c”) fuck (fullwidth Unicode characters) f.u.c.k (separator bypass) Fr33 m0ney (leet-speak) fuuuuck (character stretching) They all bypass typical word-list filters. The issue isn’t your regex. It’s the order of operations . Normalize First. Validate Second. Before checking profanity or spam, input should be normalized: Unicode NFKC normalization Zero-width character removal Separator stripping Homoglyph mapping Leet-speak normalization Repetition reduction After normalization, all evasions collapse into a canonical form. Then your profanity/spam logic actually works. What I Built I created @marslanmustafa /input-shield — a zero-dependency TypeScript validation package that: Detects Unicode homoglyph attacks Catches leet-based spam Blocks stretched profanity Detects gibberish (e.g. asdfghjkl) Supports Zod integration Validates HTML email content

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
23 views

Related Articles

What is Agent Script? How to Build Agents with It in Agentforce
How-To

What is Agent Script? How to Build Agents with It in Agentforce

Medium Programming • 15h ago

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.
How-To

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.

Medium Programming • 15h ago

Belkin’s battery-equipped Switch 2 case is more than 35 percent off right now
How-To

Belkin’s battery-equipped Switch 2 case is more than 35 percent off right now

The Verge • 16h ago

Why this Marshall is the first soundbar I've tested that truly challenges my Sonos Arc Ultra
How-To

Why this Marshall is the first soundbar I've tested that truly challenges my Sonos Arc Ultra

ZDNet • 17h ago

This App Makes Even the Sketchiest PDF or Word Doc Safe to Open
How-To

This App Makes Even the Sketchiest PDF or Word Doc Safe to Open

Wired • 17h ago

Discover More Articles