3 ms·
>Although this is not a malicious error, and typical users aren't Tweeting weird unicode, an "internal server error" for unexpected input is never a positive ex
by akjainaj 10y ago
>Although this is not a malicious error, and typical users aren't Tweeting weird unicode, an "internal server error" for unexpected input is never a positive experience for the user
What would the user expect from inputting "U+200B ZERO WIDTH SPACE" into a form, anyway?
- ttrmw 10y agoI've observed ZWSes appearing in user input for an application I maintain. It appears in text pasted from either Outlook or OWA, I believe. In our case, it is necessary that the application handle them gracefully - indeed, the user has no reason to know anything is amiss.
- akjainaj 10y agoThat internal server error only appears if you paste the ZWS by itself, without any valid text in the tweet at all. So yes, the user knows perfectly well what he's doing.
- rabidferret 10y agoThat doesn't mean that a 500 is a good UX. We give error messages on invalid form input for a reason.
- trias 10y agoi actually tweeted an zero width space some time ago and it worked. The tweet contained no text though.
- kuschku 10y agoWell, depends. If copying a table from a technical document, maybe a zero width space?
- simonbw 10y agoProbably a 4xx error not a 5xx.
- jagger27 10y ago400 Bad Request suits it.
- minimaxir 10y agoAt minimum, no error at all. Ideally, the same behavior you would get from putting in either nothing or a space. Let's try it on Facebook. Here's what happens when you put only a blank or space into a post and try to submit: http://i.imgur.com/bNtgky8.png http://i.imgur.com/bNtgky8.png Here's what happens when you put a zero width space and try to submit: http://i.imgur.com/NMgyZqc.png http://i.imgur.com/NMgyZqc.png
- BinaryIdiot 10y agoHTTP 5xx error indicates something abnormal happened on the server that wasn't handled. The server should be responding with a 400 if it's data it shouldn't accept. But yeah like others said I would expect this to turn into some sort of validation message on the client and never show them the backend error.
- kccqzy 10y agoOnce I had a form that accepted a minimum number of words. Instead of trying to write more verbosely, I simply inserted ZWS (or it could be ZWJ, can't remember) randomly in the text to fool the word count checker.