Skip to content

Commit efe02fc

Browse files
committed
Merge branch 'issue-33-html'
2 parents affa94e + 2c18329 commit efe02fc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

rules/0120-Tests.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,23 @@ user knows _why_ the test failed. You could print the arguments. You could
9696
show 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+
`<` | `&lt;` | **l**esser **t**han
108+
`>` | `&gt;` | **g**reater **t**han
109+
`&` | `&amp;` | **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

101118
If you ask the user to create a function that should work for

0 commit comments

Comments
 (0)