-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace MarkupPy by ElementTree for html conversion #554
Conversation
Codecov Report
@@ Coverage Diff @@
## master #554 +/- ##
==========================================
- Coverage 91.42% 91.37% -0.06%
==========================================
Files 28 28
Lines 2730 2713 -17
==========================================
- Hits 2496 2479 -17
Misses 234 234
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks. That's definitely better idea than mine (of skipping HTML tests). I also like that you're using DOM to create elements, that's probably the most efficient way of doing it. |
Thanks! |
Thanks for the merge. While I was on this format, I explored a bit about adding html import support, also without external dependency: #555 |
I noticed that this change breaks the CI build in django-import-export. This is for cases when we are escaping harmful characters such as script tags. If there is already an escaped character in content, then the use of ElementTree will double escape, which will not format correctly. This test will reproduce the issue: def test_html_export_with_special_chars(self):
self.founders = tablib.Dataset(headers=self.headers, title='Founders')
self.founders.append(('J & J', 'A', 90))
self.assertIn("J & J", self.founders.html) This test fails because the '&' string is exported as '&' So if someone has 'J & J' in their content (rendered with an escape), they will now get 'J & J'. |
@matthewhegarty Please create a new issue for this problem where we can discuss that double-escaping issue. |
Noteworthy change in regards of packaging: Upstream replaced the usage of python-markuppy with ElementTree jazzband/tablib#554
No description provided.