Do you have to filter user-inputted text nobody but the author will see?

In my (currently unreleased) game, Super Mashables, players have the ability to build and save a part under a name of their choosing. This user-inputted name is then used to sort the part in menus like this one:

The name isn’t visible to anyone except the person who wrote it, so would I need to use filtering in this case? I feel like having to filter out something that’s there for convenience of the user would be bad user experience.

You do not need filter text for that play session, however, if they play your game again it needs to be filtered.

But why does it matter? Why would a user need to be protected from something only they will ever see?

It’s because of the way roblox checks if a game is using proper filtering.

Oh…

I’m pretty sure the way it works is that if it stores the name in a datastore, it needs to be filtered.

Anyway, if you’re not sure if a string needs to be filtered, filter it.
You don’t want your game taken down for review.

You only need to filter it if anyone else will see it.

2 Likes

This might be off-base, but from watching DevCon, it was my understanding that as long as the player that inputted the text was the only one that would ever read it, you wouldn’t have to filter the text, regardless of whether it gets saved in a DataStore or not. I think it’s just a misconception that you have to always filter text in DataStores since most the time text in a DataStore is seen by other people.

1 Like

You do not need to filter it in the datastore, but when you retrieve the text you need to filter it before showing it to the player that wrote it.

The reason for this is roblox tracks text the client types for that play season. When the player rejoins and you redisplay the text via datastores roblox doesn’t have it tracked that the client typed that and will think your game isn’t using proper filtering methods and flag it.

3 Likes

Thank you for the detailed explanation.

To answer any questions brought up because users are just claiming that text needs to be filtered, here is the official ruling on the wiki: http://wiki.roblox.com/index.php?title=Text_Filtering#Stored_Text

5 Likes

Will we get any sort of API to mitigate this? Maybe something that’ll allow us to manually set which strings are “safe”?

You’d have to make a feature request.

1 Like

There should be function which would filter string as broadcast like for 13+ players (If I am right the current broadcast filters to prevent inappropriate content from 13- players).

No. The developer doesn’t know the age of the user, so that would be counterintuitive

The tl;dr is to not use FilterForBroadcast unless you actually have to - instead use FilterStringAsync and send it to each client individually where possible.

I am not talking about in-game clients. I am talking about hooks such as discord servers.

Http Requests are filtered?

What do you mean? I’m talking about creating a filter function which would filter the string for the broadcast on the 13+ y/o people rules (to prevent people from sharing phone numbers etc…)

As I already explained the developer doesn’t know the age of the user, so that would be counter-intuitive

Let’s say the dev is 13+ y/o and wants to collect the game feedback which will be visible only for himself… What might he do? Use normal filterforbroadcast and see 9/10 of the words hashtagged? Pretty stupid, isnt it? Second way… Do not use filter at all and make his game moderated cuz childs give phone numbers in feedback? I dont think so… So what might he do then?