TextSafety class

A utility class that provides methods to validate text input for potential Cross-Site Scripting (XSS) attacks.

The TextSafety.isUnsafeText method performs a series of checks to detect and block suspicious or malicious content, such as embedded scripts, dangerous HTML attributes, encoded payloads, and JavaScript injection.

Constructors

TextSafety.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isUnsafeText(String input) bool
Checks if the provided input string contains potentially unsafe or malicious content (e.g., XSS).