Added Code to HtmlUtils to return info when in closing tag

Possible fix for #3407 and #1570.
@RaymondLim you may want to look at this.