Unscrew Redraft
This commit is contained in:
parent
11b8cc8034
commit
938f4aac0c
|
@ -207,6 +207,7 @@ public class Tootle.PostDialog : Gtk.Dialog {
|
|||
|
||||
var content = Html.simplify (status.content);
|
||||
content = Html.remove_tags (content);
|
||||
content = RichLabel.restore_entities (content);
|
||||
dialog.text.buffer.text = content;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,14 +12,17 @@ public class Tootle.RichLabel : Gtk.Label {
|
|||
|
||||
public static string escape_entities (string content) {
|
||||
return content
|
||||
.replace ("&", "&")
|
||||
.replace ("'", "'");
|
||||
.replace ("&", "&")
|
||||
.replace ("'", "'");
|
||||
}
|
||||
|
||||
public static string restore_entities (string content) {
|
||||
return content
|
||||
.replace ("&", "&")
|
||||
.replace ("'", "'");
|
||||
.replace ("&", "&")
|
||||
.replace ("<", "<")
|
||||
.replace (">", ">")
|
||||
.replace ("'", "'")
|
||||
.replace (""", "\"");
|
||||
}
|
||||
|
||||
public new void set_label (string text) {
|
||||
|
|
Loading…
Reference in New Issue