This should not be done on the front end, this should be done entirely on the back end as the content is served to you from the api.
This approach may work well for the game client, but all you need to do is open the debugger to see the full list of bad words and other things that get filtered. This list should not be user accessible by any means.
Edit: I've been told that filtering does happen on the back end, if this is the case, this list should not exist anywhere on the front end.