Added some more XHTML replacement and relative unit test

replacement for https://github.com/silverstripe/sapphire/pull/1276