cenkalti / pyhtml

HTML generation library for Python
Other
70 stars 10 forks source link

strip _ from reserved tag names #12

Closed nihlaeth closed 7 years ago

nihlaeth commented 7 years ago

Fix #11

I originally tried fixing it by stripping the underscore in Tag.name, but for some reason I can't figure out that method is only called for the html, script and style tags in my tests. So I opted for a slightly dirtier fix in Tag.render

nihlaeth commented 7 years ago

I see now that name is statically assigned for tag classes right here. This could be omitted in favour of the more elegant fix, but that's up to you.

nihlaeth commented 7 years ago

Or we could strip the trailing _ at that point of course.

cenkalti commented 7 years ago

I guess this is more correct: 66d88ea6198f9c72777f9a8cb2b3071dac869d32

Let me know if you have questions.