CompTIA CySA+ (CS0-002) — Question 121

A developer is working on a program to convert user-generated input in a web form before it is displayed by the browser. The technique is referred to as:

Answer options

Correct answer: A

Explanation

The correct answer is A, Output encoding, as it specifically deals with converting user input to prevent injection attacks and ensure safe display in browsers. The other options do not accurately describe this process; for instance, Data protection refers to safeguarding data, Query parameterization is about securing queries to databases, and Input validation focuses on checking input for correctness rather than transforming it.