Added support for HTML replacement -- Replacing the end part too.