Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    XSS is properly handled by encoding the text that comes from or that is interpolated with text that comes from the user. How to encode text depends on the context (encoding output for JavaScript is different from encoding output for an XML attribute value). "Cleaning the data" is a hack, which often turns out to be easier than encoding text for output when your language/stdlib/framework doesn't encode text automatically and doesn't provide a convenient way to encode text manually. Commented Feb 10, 2011 at 14:34