Merge branch 'mjog/preview-regex-segfault' into 'mainline'

Fix segfault on invalid UTF-8 when generating preview

See merge request !340

(cherry picked from commit d0773078)

7bac77df Fix segfault on invalid UTF-8 when generating preview
4 jobs for cherry-pick-d0773078 in 28 minutes and 42 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #474820
ubuntu

00:14:28

 
  Test
passed #474821
flatpak

00:13:37

 
  Deploy
passed #474822
review

00:00:36

failed #474823
allowed to fail manual
stop_review

 
Name Stage Failure
failed
stop_review Deploy There has been a missing dependency failure
No job log