4 ms·
Then what if someone starts putting in unicode control characters? What if you display their name as the title of a window and they made their name start with
by YokoZar 13y ago
Then what if someone starts putting in unicode control characters? What if you display their name as the title of a window and they made their name start with two right to left control marks, causing Windows to invert the entire window contents?
- grey-area 13y agoFor specific uses (like output to html), you will have to escape the content, as with any other content, but you can store what the user input.
- db48x 13y agonames are no different from any other form of user input in this regard. Any time you include user input in a document you should follow it with a direction override character to restore the text direction, just in case the user changed it. You could also strip these characters out, but some people really do want their name to show up backwards, and for that to be consistent across all cases.