It depends on the context in which this string is used.
For example, if a line is printed as part of an HTML page, then the special HTML characters < , > , " and ' can potentially be XSS risks.
If it is passed through JSON, then ' and " could potentially be XSS risks.
If it is included in SQL statements (which really should not be, at least not directly - to use parameterized queries), then things like ; and backlinks can be a problem.
Et cetera.
source share