﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33236	assertHTMLEqual() shows a confusing error with escaped HTML.	Pratyush Mittal	Pratyush Mittal	"The diff shown in the error message of assertHTMLEqual seems to be converting escaped HTML text to unescaped text.

This makes it hard to write tests when testing XSS vulnerabilities in our tags and filters. Though the assertions work correct, the error messages don't show the correct differences.

**Steps to reproduce**

{{{
from django.test import TestCase

class UtilsTestCase(TestCase):
def test_assersion(self):
	escaped = ""<p>&lt;foo&gt;</p>""
	raw = ""<p><foo></p>""
	self.assertHTMLEqual(escaped, raw)
}}}

**Expected Output**

{{{
AssertionError: <p>
&lt;foo&gt;
</p> != <p>
<foo>
</p>
  <p>
- &lt;foo&gt;
+ <foo>
  </p>
}}}

**Actual Output**

{{{
AssertionError: <p>
<foo>
</p> != <p>
<foo>
</p>
  <p>
  <foo>
  </p>
}}}
"	Bug	closed	Testing framework	3.2	Normal	fixed			Ready for checkin	1	0	0	0	1	0
