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
96
96
show a hint. Either way, a user shouldn't be left alone in face of an error.
97
97
98
98
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
+
99
116
## Always test all corner cases of your input domain
100
117
101
118
If you ask the user to create a function that should work for
You can’t perform that action at this time.
0 commit comments