bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

AssertionError in html5lib

VERIFIED FIXED in 6.0.1

Status

addons.mozilla.org Graveyard
Public Pages
P2
normal
VERIFIED FIXED
8 years ago
3 years ago

People

(Reporter: jbalogh, Assigned: gkoberger)

Tracking

Details

(Reporter)

Description

8 years ago
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
(Assignee)

Comment 1

8 years ago
Jeff- do you happen to have the HTML that triggered this error?  Which form?
(Assignee)

Comment 2

8 years ago
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
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 3

7 years ago
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.