" | " |
| ' | ' |
| & | & |
| > | > |
| < | < |
| ⁄ | / |
Given a string markup, replace each of these codes with its character and return the result. Everything else, including unknown codes such as , stays unchanged.
The string is scanned left to right exactly once: characters produced by a replacement are not decoded again. For example, &gt; becomes >, not >.markup="5 < 7 && 7 > 5" → '5 < 7 && 7 > 5'
< becomes <, each & becomes &, and > becomes >.
markup="&lt; stays <" → '< stays <'
The replacement is a single pass: & turns into &, and the resulting < is not decoded again.
markup="path⁄to &unknown; "x" → 'path/to &unknown; "x'
⁄ is /. &unknown; is not in the table and "x has no semicolon, so both stay as they are.
markup may contain any of the 256 ASCII charactersmarkup="5 < 7 && 7 > 5"
'5 < 7 && 7 > 5'
Run checks the first 3 tests in your browser. Submit checks all 8 tests on the server, hidden ones included.