0
Sanitize data input
Hi, I want to sanitize some data input. I would prefer a whitelisting function- so only approved input. I am guessing I could do this with a function that compares characters to my whitelist and rejects all "non approved characters", but I would rather have a module or a Regular Expression that has an allowed list of characters. basically I want ro use a standard module...what do you guys use?
1 Réponse
0
I didn't understand very well, but If you want to compare two list is very easy. You coul use something like: if x in whitelist:
x is an element of the other list.
you need to pass x values in a loop.
for example:
loop de list1 that extract x elemet
is x in whitelist? (whitelist is a list with whitelis elemets)