replace html tag without use regex or xregex in JavaScript