utils: implement html-to-text
Implement a crude html-to-text scraper function, to extract plain text from html messages, so we can use it for indexing.
This commit is contained in:
@ -265,6 +265,16 @@ std::string date_to_time_t_string(int64_t t);
|
||||
*/
|
||||
std::string time_to_string(const char *frm, time_t t, bool utc = false) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
* Crudely convert HTML to plain text. This attempts to scrape the
|
||||
* human-readable text from html-email so we can use it for indexing.
|
||||
*
|
||||
* @param html html
|
||||
*
|
||||
* @return plain text
|
||||
*/
|
||||
std::string html_to_text(const std::string& html);
|
||||
|
||||
/**
|
||||
* Hack to avoid locale crashes
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user