(code)
return ' ' not in code and ('%20' in code or code.count('%') > 3)
Detects if a scriptlet is urlencoded.
Detects if a scriptlet is urlencoded.
Detects if a scriptlet is urlencoded .
def detect(code):
    """Detects if a scriptlet is urlencoded."""
    # the fact that script doesn't contain any space, but has %20 instead
    # should be sufficient check for now.
    return ' ' not in code and ('%20' in code or code.count('%') > 3)
def detect ( code ) : # the fact that script doesn't contain any space, but has %20 instead # should be sufficient check for now. return ' ' not in code and ( '%20' in code or code . count ( '%' ) > 3 )