translate html to new format