Merge branch 'mjog/preview-regex-segfault' into 'mainline'
Fix segfault on invalid UTF-8 when generating preview See merge request GNOME/geary!340
This commit is contained in:
commit
d0773078f0
1 changed files with 4 additions and 1 deletions
|
|
@ -248,7 +248,10 @@ public string to_preview_text(string? text, TextFormat format) {
|
|||
preview = Geary.HTML.html_to_text(text, false);
|
||||
}
|
||||
|
||||
return Geary.String.reduce_whitespace(preview);
|
||||
// XXX really shouldn't have to call make_valid here but do so to
|
||||
// avoid segfaults in the regex engine on invalid char data. See
|
||||
// issue #186 for the proper fix.
|
||||
return Geary.String.reduce_whitespace(preview.make_valid());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue