updated to support custom html elements in mf documents