SafeString extension

Extension on String to provide additional security and sanitization methods.

on

Methods

fromSafe(String password) String

Available on String, provided by the SafeString extension

Decrypts a base64-encoded AES-encrypted string using a provided password.
removeHtmlTags({String replace = ''}) String

Available on String, provided by the SafeString extension

Removes HTML tags from the string, optionally replacing them with a specified string.
removeScripts() String

Available on String, provided by the SafeString extension

Removes <script> tags and JavaScript event handlers from the string.
toSafe(String password) String

Available on String, provided by the SafeString extension

Encrypts the string using AES encryption with a provided password.