The encoder touches only the five characters that start markup or quotes. It does not wrap the text in a tag and it does not encode letters.
The decoder knows the common named entities, including amp, lt, gt, quot, apos, nbsp, copy, and mdash, plus decimal and hexadecimal numeric references. An unknown name is left as written.