Article 6WFK0 CodeSOD: Insanitize Your Inputs

CodeSOD: Insanitize Your Inputs

by
Remy Porter
from The Daily WTF on (#6WFK0)

Honestly, I don't know what to say about this code sent to us by Austin, beyond "I think somebody was very confused".

string text;text = "";// snipbox.Text = text;text = "";text = XMLUtil.SanitizeXmlString(text);

This feels like it goes beyond the usual cruft and confusion that comes with code evolving without ever really being thought about, and ends up in some space outside of meaning. It's all empty strings, signifying nothing, but we've sanitized it.

proget-icon.png [Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments