Improves HTML markup replacement

- Added regex replacement for some cases.