I have a requirement wherein I store html text as string in python and want to compare them.
str1 = '<br> Example1'
str2 = '<br/> Example1'
If I do a normal str1 == str2
, it will be False
. But in html they are equal.
At the same time
str1 = '<br> Example1'
str2 = '<p> Example1'
is not html equal. Same goes with str2 = '<b> Example </b>'
where str1!=str2
Are there any way to do it in python. I know the test case has self.assertInEmail
which does html comparison, but I dont want to use test functions in my production code.