Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Commit

Permalink
#939, #937: Fix crash on ArchLinux and Ubuntu 22.10 Kinetic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teejee2008 committed Oct 15, 2022
1 parent 9d614d5 commit 5a78bb7
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/Utility/TeeJee.Misc.vala
Expand Up @@ -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){
Expand Down

0 comments on commit 5a78bb7

Please sign in to comment.