Formatting
The encoder turns characters into named HTML entities, and it does not stop at the five characters people usually escape. Odd socks in the dryer. becomes Odd socks in the dryer.. The period is .. Tom & Jerry <script> becomes Tom & Jerry <script>, which is the part you wanted, sitting next to that more aggressive encoding.
That extra encoding surprises anyone who expected only & , < , > , quotes. A diff against a minimal escaper will show . and other named forms. Decode reverses them, so the round trip holds, but the encoded string is longer and noisier than a hand-written escaper. Direction starts on encode. The decoder page starts on decode.
Encoding is for putting text into HTML so the browser shows it. It is not encryption, and it is not a URL encoding. A space stays a space. %20 is the URL encoder’s job.
Direction encode. Odd socks in the dryer.
Odd socks in the dryer.
The period is the surprise. If you only test with an ampersand, you will not see . until the copy is already in a template.
This encoder emits named entities for a wide set of characters, not only & < > " '. Odd socks in the dryer. ends in .. The decoder turns that back into a period.
A normal space stays a space. A non-breaking space is a different character and would be encoded as its own entity.
No. URL encoding turns a space into %20 and leaves many punctuation marks for encodeURI. This page speaks HTML entities.
Not from this result. Tom & Jerry <script> encodes to Tom & Jerry <script>, which a browser shows as text if you place it in HTML text.