Only convert text inside elements that are not SCRIPT or STYLE

See the tests for use cases.

Also fixes a bug whereby it would not convert quotes at the end of a single character, e.g. `"'1'"`.

TODO: Clean up repetition in these tests.
We just need to test for a single or double quote right? `/['"]/.test(str)`?