Is filtering required for input only visible to the client?

Hello!

Basically, I want players to be able to make “notebooks”: they can write on them, save them, and only them (and me because of datastores) is able to read them.

My question is: Do I still have to filter text in that case?

Thanks in advance,
Mehdi

Hi, yeah you would still have to filter text.
You have to abide by TOS in any case if it’s related to ROBLOX.

3 Likes

Alright. Thanks. Do you have any good tutorials about how to filter text?

Sadly no, I’m mostly into UI’s and 3D Modeling. If any question pertains to those two topics. I’d gladly answer.

Alright, thanks for helping and have a great day!

1 Like

Two words, search bar.

There are so many tutorials on it.

Hope those help.

This I have to counter: no, filtering is not required for something only visible to the client. This information is readily available on Text and Chat Filtering which is your go-to guide for understanding how to filter and in what cases it would be appropriate to do so.

There are two specific excerpts to focus in on from the Exceptions section:

The one exception to text filtering is when it comes to displaying text to a player that they wrote themselves, although there are still some considerations to keep in mind.

…If a player’s text is saved and then is retrieved later when the player rejoins the game, that saved text needs to be filtered before it is displayed to anyone, including the player who wrote it.

Filtering is used only in cases where you are actively displaying content from one end user to another. Do note that even officially supported chat scripts contain an editable flag that allows the client to see their own messages in the chat unfiltered for the sake of user convenience. It’s in your best interest to filter in those kinds of cases though so the client knows what others saw of their message but not immediately, that can be done later. For things like journals though, not necessary.

The only time that it would be necessary to filter something only visible to the client is upon their next play session if you are saving the content to a DataStore. When it is pulled from the DataStore, you are required to pass the retrieved string through the filter before showing it to the client.

6 Likes

Really? This is unreasonable for games that allow players to create hundreds of custom characters with custom names and descriptions.

3 Likes

Hi!

Thanks for the clarification.
I’ll make sure to filter my text.

Have a great day!

I believe their logic is “if you are storing it, there’s a good chance someone else might see it”. Even if you’re only loading it, and sending it straight to the client who wrote it. This is the case, although I agree that it is pretty unreasonable.