feat: automated profanity filter for event content (#571) - #770
feat: automated profanity filter for event content (#571)#770saurabhhhcodes wants to merge 1 commit into
Conversation
…ngh#571) Event titles, descriptions and venues were written to Firestore with no content moderation, letting offensive words reach all students. - lib/profanity.js: dependency-free filter — leet-digit mapping (1->i, 4->a, 5->s, ...), case-insensitive, separator-dodging ('f.u.c.k', 'F U C K', 'f***k'), boundary-aware so harmless words containing blocklist substrings are NOT flagged; exports PROFANITY_WORD_LIST, findProfanity, containsProfanity, maskProfanity - CreateEvent.js: blocked word in title/description/location blocks publish with a clear alert before any write - 11 unit tests: plain/leet/padded variants, safe words, masking
|
Warning Review limit reached
Next review available in: 58 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Closes #571
Problem
Event titles, descriptions, and venues are written to Firestore with no content moderation, so offensive language reaches all students/public pages immediately.
Changes
app/src/lib/profanity.js(new, zero dependencies):f.u.c.k,F U C K,f\*\*\*k)classic,grass,cucumberare safePROFANITY_WORD_LIST(configurable),findProfanity,containsProfanity,maskProfanityapp/src/screens/CreateEvent.js: publishing is blocked (clear alert naming the word) when title, description, or venue contain a blocked word — before any write, including offline queueing.app/src/lib/__tests__/profanity.test.js: 11 tests — plain/leet/padded variants detected, innocent substrings not flagged, masking length-preserving.