Fix segfault on invalid UTF-8 when generating preview

5 jobs for mjog/preview-regex-segfault in 24 minutes and 41 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #474795
fedora

00:08:04

passed #474796
ubuntu

00:14:34

 
  Test
passed #474797
flatpak

00:08:54

 
  Deploy
passed #474798
review

00:00:37

passed #474799
allowed to fail manual
stop_review

00:00:35