Needs work
Project:
Mail System
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 May 2011 at 11:49 UTC
Updated:
3 Jun 2015 at 06:08 UTC
Jump to comment: Most recent, Most recent file
Note to self: track changes in #299138
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | html-to-text-loop.txt | 4.43 KB | Jorrit |
Comments
Comment #1
pillarsdotnet commentedNew patch #299138-155: Improve \Drupal\Core\Utility\Mail::htmlToText()
Comment #2
pillarsdotnet commentedApplied #299138-157: Improve \Drupal\Core\Utility\Mail::htmlToText() to:
Comment #3
pillarsdotnet commentedApplied #299138-167: Improve \Drupal\Core\Utility\Mail::htmlToText() to:
Comment #4
pillarsdotnet commentedLatest is #299138-190: Improve \Drupal\Core\Utility\Mail::htmlToText()
Applied to:
Comment #5
pillarsdotnet commentedLatest is #299138-198: Improve \Drupal\Core\Utility\Mail::htmlToText()
Comment #6
pillarsdotnet commentedFull table support added: #299138-230: Improve \Drupal\Core\Utility\Mail::htmlToText()
I can attest that this version does a better job of presenting complex layout than Mozilla Thunderbird in "View message as plain text" mode.
Comment #7
pillarsdotnet commentedMinor line-wrapping improvements: #299138-232: Improve \Drupal\Core\Utility\Mail::htmlToText()
Comment #8
Jorrit commentedThe latest version is not working well with nested tables. The do { } while($width > 2) loop is taking a lot of time, more than 30 seconds on my server. I have removed all unnecessary parts from the HTML code such that the problem occurs. I have tried to find the problem, but the code is too vague for me.
Maybe I should put this report in #299138, but I see that there are some fixes made to table conversion after June 4th, 2011. Maybe you can check if the attached file parses properly for the new version?
Comment #9
pillarsdotnet commented@#8 -- Thanks. I'll check.
Comment #10
pillarsdotnet commentedThanks very much for the test case; I've added it to the tests for the new version.
I've replaced the linear search with a binary search, and your test case helped me find a few bugs in nested table parsing.
Comment #11
pillarsdotnet commented#299138-246: Improve \Drupal\Core\Utility\Mail::htmlToText()
Improved table generation accuracy and performance.
Added test for correctly formed deeply-nested tables.
Test also asserts that table generation takes less than one second.
Comment #12
Jose Chaves commentedFatal error: Call to undefined function _drupal_html_to_text() in /home/edicoesv/public_html/sites/all/modules/mailsystem/html_to_text.inc on line 559
Comment #13
pillarsdotnet commentedThanks; fixed.