File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,23 @@ user knows _why_ the test failed. You could print the arguments. You could
9696show a hint. Either way, a user shouldn't be left alone in face of an error.
9797
9898
99+ ### Think of the HTML
100+
101+ Keep in mind that every output will be interpreted as HTML. If you want to
102+ use ` < ` , ` > ` or ` & ` in your error messages or description, make sure to
103+ escape it---unless you actually want to use HTML tags:
104+
105+ Character | [ HTML entity] | Mnemonic
106+ ----------|---------------|-------------------------------------------
107+ ` < ` | ` < ` | ** l** esser ** t** han
108+ ` > ` | ` > ` | ** g** reater ** t** han
109+ ` & ` | ` & ` | ** amp** ersand
110+
111+ All other characters are usually safe to use in UTF8 encoded documents.
112+
113+ [ HTML entity ] : http://dev.w3.org/html5/html-author/charref
114+
115+
99116## Always test all corner cases of your input domain
100117
101118If you ask the user to create a function that should work for
You can’t perform that action at this time.
0 commit comments