When using the HTML5 sanitizer (Rails::HTML5::Sanitizer), Nokogiri before 1.19.5 serializes < and > unescaped within attribute values. The text helpers `highlight()` and `simple format()` sanitize input and process the resulting HTML as a string. Specifically, `highlight()` splits content on tag boundaries, and `simple format()` splits content into paragraphs based on blank lines. An unescaped > or a blank line within an attribute value can cause markup that was previously inert to be emitted as live elements in the `html safe` output, potentially leading to Cross-Site Scripting (XSS), where an attacker injects malicious scripts into web pages viewed by other users.