Only convert text inside elements that are not SCRIPT or STYLE

See the tests for use cases.

TODO: Clean up repetition in these tests.