SafeString extension
Extension on String to provide additional security and sanitization methods.
- on
Methods
-
fromSafe(
String password) → String - Decrypts a base64-encoded AES-encrypted string using a provided password.
-
removeHtmlTags(
{String replace = ''}) → String - Removes HTML tags from the string, optionally replacing them with a specified string.
-
removeScripts(
) → String -
Removes
<script>
tags and JavaScript event handlers from the string. -
toSafe(
String password) → String - Encrypts the string using AES encryption with a provided password.