How could I check if string has already been encoded?
For example, if I encode TEST==, I get TEST%3D%3D. If I again encode last string, I
TEST==
TEST%3D%3D
In order to avoid encoding twice and generating a bug (as the OP is stating) we unquote and than quote again, in Python this will be:
import urllib.parse urllib.parse.unquote(str) urllib.parse.quote(str)