Introduce a lighter text filtering API

As a Roblox developer, I often find myself in situations where I need to filter text for purposes other than chat messages and showing info to other Roblox players(apart from me). In situations like this I don’t care much about if the text looks offending, or if the text has some sort of numerical information in it, since the text will never reach another player apart from me.

For that scenario, I think that it is ideal to have a lighter Roblox filtering API, only for extreme profanity(for example direct mentions of swear words, illegal content) so we can save user strings inside Roblox systems(for example datastores) without worrying we might be saving something illegal or highly inappropriate for the Roblox platform.

Basically a system that filters things such as the n word, or sexual words, but not something like the word “idiot”.

2 Likes

Can you provide specific user stories for this? I have some ideas for what you mean by “filter text for purposes other than chat messages and showing info to other Roblox players”, but it would help to be clearer on what you want.

Personally, I have a coding language made in luau for game plugins that exposes multiple ways which can be used to display text to players.

Filtering has always been an issue since there’s no way that exists for filtering messages which don’t come from any player, so the only options I have are to either use a random player as the sender or make my own script to handle the filtering.

I cannot make the original player who wrote the code be the sender, as they are not guaranteed to be in the server after the code was saved, and filtering the entirety of the code is not feasible as it will include content such as numbers which are very likely to get filtered, thus making it much harder and unpredictable than it should be to write the code and get it to save.

Is the intent that other people can read the code someone wrote?

No, the language exposes functions that can display text to players currently playing such as from notifications or in chat, which is what I’d like a better way to filter messages from the code for. only people that have access to editing code can see the code running.

It’s difficult for me to see where in this pipeline it would be safe for us to do intentionally minimal filtering. Filtering code where the user isn’t in game is definitely a gap we have, but with your example, we have to still sometimes filter numbers. For example, a user writing myPhoneNumberIs(5551234567). That’s not a theoretical concern either–there’s precedent in online gaming for that exact thing. Also, it’s not clear to me why “idiot” would be bad in chat but fine in user code.

Text filtering false positives are something we are actively investigating relatively soon, but I don’t think a lighter text filtering API is something we can do.

Im fine with it not being lighter, a way to fill the gap of filtering without a sender or a player that isn’t in the server would be enough for my case, though I can’t speak for the original poster.

For example, a user may wish to add string information in the form of notes to items they own, or they may want to add notes to other user profiles(notes that only them can see). All this involves datastores, and extensive filtering(for example to avoid information sharing, offending people) isn’t needed because only the original user can view said text(when they rejoin and their data is loaded again). But on the same time, due to obvious reasoning, actual illegal content or extreme profanity needs to be filtered, therefore we need access to a lighter filtering API. Having an actual API for this specific purpose is much more convenient than having to use extensive filters or custom filters and be uncertain if some Roblox system with flag it as inappropriate content.