Sanitizing user comment entries text field help

Can you post the whole script and error message? It’s not impossible, but it seems unlikely to me that an errant ] character would cause an error if provided in the right place.

1 Like

Irosed asked why am I replacing 20 other characters.

I looked up methods of sterilizing the user comments
this was among the recommendations

Zacht asked can I post the script and error.

I try to avoid posting some of the content so I don’t upset anyone here.
I can see how the “]” might seem unlikely.
I get many comments through this script daily.
When I try to see like what is different from here to there, this “]” sticks out to me.
I kind of think it might something that happens in 8.1.0 when the text field has more text than the column in the table was created to hold, but I am not sure.
Though I also wonder why it says File "", in the error. Some values are showing as " "
Maybe one of them being null is an issue.

no more questions for now, I am not fast enough at the moment

Thanks very much for the help, and again sorry if I missed any questions.
I appreciate all the help. I still need to read more on that page that Peter posted and more about the try and except.

I am going to work on the try and except for now.

I don't think I updated this.

I ended commenting out my sanitization because I was informed in this thread that prepupdate handles sanitizing.

I think the error was from comments being too long.

I used a parameter for the max length and comparing it as users put in data so that it would actually trim as they typed. I would link the thread if I could find it.