Closed Bug 638666 Opened 13 years ago Closed 13 years ago

AssertionError in html5lib

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jbalogh, Assigned: gkoberger)

Details

See bug 568317 and the fix in bleach at https://github.com/jsocol/bleach/commit/d4bdcb. We should push a fix tomorrow (Friday).

 File "/data/amo_python/www/prod/zamboni/apps/amo/utils.py", line 161, in default
   return unicode(obj)

 File "/data/amo_python/www/prod/zamboni/apps/translations/models.py", line 123, in __unicode__
   self.clean()

 File "/data/amo_python/www/prod/zamboni/apps/translations/models.py", line 131, in clean
   string = self.clean_nl(self.localized_string)

 File "/data/amo_python/www/prod/zamboni/apps/translations/models.py", line 172, in clean_nl
   return serializer.render(stream)

 File "/data/amo_python/www/prod/zamboni/vendor/lib/python/html5lib/serializer/htmlserializer.py", line 224, in render
   return u"".join(list(self.serialize(treewalker)))

 File "/data/amo_python/www/prod/zamboni/vendor/lib/python/html5lib/serializer/htmlserializer.py", line 103, in serialize
   for token in treewalker:

 File "/data/amo_python/www/prod/zamboni/vendor/lib/python/html5lib/treewalkers/_base.py", line 143, in __iter__
   firstChild = self.getFirstChild(currentNode)

 File "/data/amo_python/www/prod/zamboni/vendor/lib/python/html5lib/treewalkers/simpletree.py", line 52, in getFirstChild
   assert node.hasContent(), "Node has no children"

AssertionError: Node has no children
Priority: -- → P2
Target Milestone: 6.0.0 → 6.0.1
Jeff- do you happen to have the HTML that triggered this error?  Which form?
Anytime anyone used "<tag" as a string, it broke.  Annoying edge case, but it did pop up a few times.  So, I made some changes and upgraded bleach.

http://github.com/jbalogh/zamboni/commit/a4ed2ac
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
verified @ https://addons-next.allizom.org/en-US/firefox/addon/bug-611534/

Checked all form fields in

* Add-on details/EULA/privacy policy
* Edit profile
* Add-on review
* Collections
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.