refact htmlParsingHelper