I'm trying to compare two sting spans.
For example, I have as input:
var span1 = "<SPAN style=\"FONT-SIZE: 9pt; FONT-FAMILY: Arial; FONT-WEIGHT: bold\">hello<FONT style=\"FONT-FAMILY: Wingdings; COLOR: #ffff00\">ll</FONT>hi<BR><BR></SPAN>";
var span2 = "<span style=\"font-weight: bold; font-size: 9pt; font-family: Arial;\">hello<font style=\"color: #FFFF00; font-family: Wingdings;\">ll</font>hi<br><br></span>"
Those two spans will render the same thing in UI. But I can't find a proper way to prove that are equals using JavaScript or JQuery.
I looked at this question, but the response does not work for me because:
- Nodes' order can change
- Semi-colons are not mandatory with last attribute
- Text can use lower or upper cases
Also that question is little bit old. So I thought may be there is a new that I can follow?