Fixes #4228: Use SetHtml instead of replace