Skip to content

Instantly share code, notes, and snippets.

@R0mb0
Created February 13, 2025 10:35
Show Gist options
  • Save R0mb0/2138cc1bdfdc9ec186838e3afa6ea691 to your computer and use it in GitHub Desktop.
Save R0mb0/2138cc1bdfdc9ec186838e3afa6ea691 to your computer and use it in GitHub Desktop.
'Function to check if a character is a special character in Classic ASP.
<%
Function is_special_character(character)
Select Case character
Case "."
is_special_character = true
Exit Function
Case ","
is_special_character = true
Exit Function
Case ":"
is_special_character = true
Exit Function
Case ";"
is_special_character = true
Exit Function
Case "`"
is_special_character = true
Exit Function
Case "/"
is_special_character = true
Exit Function
Case "\"
is_special_character = true
Exit Function
Case "|"
is_special_character = true
Exit Function
Case "_"
is_special_character = true
Exit Function
Case "-"
is_special_character = true
Exit Function
Case "~"
is_special_character = true
Exit Function
Case "!"
is_special_character = true
Exit Function
Case "@"
is_special_character = true
Exit Function
Case "#"
is_special_character = true
Exit Function
Case "$"
is_special_character = true
Exit Function
Case "%"
is_special_character = true
Exit Function
Case "^"
is_special_character = true
Exit Function
Case "&"
is_special_character = true
Exit Function
Case "*"
is_special_character = true
Exit Function
Case "("
is_special_character = true
Exit Function
Case ")"
is_special_character = true
Exit Function
Case "+"
is_special_character = true
Exit Function
Case "="
is_special_character = true
Exit Function
Case "{"
is_special_character = true
Exit Function
Case "["
is_special_character = true
Exit Function
Case "}"
is_special_character = true
Exit Function
Case "]"
is_special_character = true
Exit Function
Case "'"
is_special_character = true
Exit Function
Case "<"
is_special_character = true
Exit Function
Case ">"
is_special_character = true
Exit Function
Case else
is_special_character = false
Exit Function
End Select
End Function
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment