~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/util/util-webkit.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-10-10 17:40:37 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131010174037-5p5o4dlsoewek2kg
Tags: 0.4.0-0ubuntu1
New stable version

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
    return outtext;
289
289
}
290
290
 
 
291
// This will modify/reset the DOM
291
292
public string html_to_flowed_text(WebKit.DOM.Document doc) {
292
 
    // Work on a copy of the document's body.
293
 
    WebKit.DOM.HTMLElement? body = Util.DOM.clone_node(doc.get_body());
294
 
    assert(body != null);
295
 
    
296
293
    WebKit.DOM.NodeList blockquotes;
297
294
    try {
298
 
        blockquotes = body.query_selector_all("blockquote");
 
295
        blockquotes = doc.query_selector_all("blockquote");
299
296
    } catch (Error error) {
300
297
        debug("Error selecting blockquotes: %s", error.message);
301
298
        return "";
321
318
    }
322
319
    
323
320
    // Reassemble plain text out of parts, replace non-breaking space with regular space
324
 
    string doctext = resolve_nesting(body.get_inner_text(), bqtexts).replace("\xc2\xa0", " ");
 
321
    string doctext = resolve_nesting(doc.get_body().get_inner_text(), bqtexts).replace("\xc2\xa0", " ");
325
322
    
326
323
    // Reassemble DOM
327
324
    for (int i = 0; i < nbq; i++) {