Modifying HTML Content and Attributes

What's the safest way to add text content to an element to prevent XSS (Cross-Site Scripting) attacks?
Next Question (2/20)