|
|
|
|
|
by zAy0LfpBZLC8mAC
2307 days ago
|
|
No, it's terrible advice as it only causes unnecessary interoperability problems and vulnerabilities. There is no reason why anyone should need to generate invalid input to your program and it is never a better idea to make every consumer more complex to deal with broken input than to make one producer create non-broken output. The only robustness to invalid input you should have is that you should not fall over when you encounter broken input, but simply reject it. |
|
You know what followed your principle? XHTML...and the arguments were the same, its not well formed just reject it, why would you ever accept broken input.
Sure it makes parsing faster and simpler and yet what actually works and is robust in the real world, HTML...