Modify ↓
Opened 8 years ago
Closed 8 years ago
#12767 closed defect (fixed)
Test failure with Genshi not installed
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Noted in gmessage:trac-dev:WNUV3uCJkYk/9oKMfmGXAwAJ:
====================================================================== ERROR: test_input_type_password (trac.util.tests.html.TracHTMLSanitizerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/tests/html.py", line 104, in test_input_type_password self.assertEqual('', self.sanitize(html)) File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/tests/html.py", line 100, in sanitize return unicode(TracHTMLSanitizer().sanitize(html)) File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/html.py", line 639, in sanitize transform.feed(html) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 117, in feed self.goahead(0) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 161, in goahead k = self.parse_starttag(i) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 325, in parse_starttag self.handle_startendtag(tag, attrs) File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/html.py", line 980, in handle_startendtag self._handle_start(tag, attrs, '/') File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/html.py", line 962, in _handle_start if not self.sanitizer.is_safe_elem(tag, attrs): File "/Users/rjollos/Documents/Workspace/trac-dev/trac-trunk/trac/util/html.py", line 710, in is_safe_elem if isinstance(attrs, Attrs): TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types ---------------------------------------------------------------------- Ran 2112 tests in 146.305s
Attachments (0)
Change History (3)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks, committed to trunk in r15766.
Note:
See TracTickets
for help on using tickets.
Attrs
isNone
when Genshi not installed: trunk/trac/util/html.py@15614:50#:L40.Is the following patch sufficient?:
trac/util/html.py
isinstance(attrs, Attrs):