helper to set attributes on an element from a map of values
dummy compare of html content with a sort of the attributes
ignore html attributes order for comparition
save original tag attributes
restore original tag attributes n creation and overwrite if required by settings