Added some more XHTML replacement and relative unit test

Replacement for https://github.com/silverstripe/sapphire/pull/1268