Correctly close the tags in `String::substrHtml()`