fix regex replace bug and add h1, h2, h3, a tag