|
|
|
|
|
by zAy0LfpBZLC8mAC
4443 days ago
|
|
He is perfectly following his own advice. Apparently, his form field takes HTML syntax with a subset of HTML tags. Your input does not conform to that. So, instead of silently altering what you wrote, it tells you about the validation failure and asks you to correct your input instead of silently changing what you wrote. The input field takes HTML, so you have to write "<script>" (I suppose, haven't tested it) in order to display "<script>" - that is perfectly consistent. |
|
I was actively trying to talk about his script example and instead I had to second-guess his parser to get past the validator (I eventually resigned and replaced < and > with [ and ]).
If you want to support some tags, have your parser be an HTML-like DSL language with those tags supported. Don't disallow perfectly good input.