#939, #937: Fix crash on ArchLinux and Ubuntu 22.10 Kinetic

This seems to be an issue with glib2 2.74 and strings that contain a improper unicode escape code (\uXX instead of /uXXXX). Since this function is used by all the progress windows, creating or deleting snapshots from the GUI was causing a crash.
This commit is contained in:
Tony George 2022-10-15 12:43:30 +05:30 committed by Michael Webster
parent e8edf174dc
commit 22216d6acb

View File

@ -149,27 +149,9 @@ namespace TeeJee.Misc {
return new_txt;
}
public string escape_html(string html, bool pango_markup = true){
string txt = html;
if (pango_markup){
txt = txt
.replace("\\u00", "")
.replace("\\x" , "");
}
else{
txt = txt
.replace(" ", " "); //pango markup throws an error with  
}
public string escape_html(string html){
txt = txt
.replace("&" , "&")
.replace("\"", """)
.replace("<" , "&lt;")
.replace(">" , "&gt;")
;
return txt;
return GLib.Markup.escape_text(html);
}
public string unescape_html(string html){