Tootle is a client for the world’s largest free, open-source, decentralized microblogging network with real-time notifications and support for multiple accounts. @@ -18,16 +18,16 @@ Anyone can run a Mastodon server. Each server hosts individual user accounts, the content they produce, and the content to which they are subscribed. Every user can follow each other and share their posts regardless of their server.
", "") .replace("
", "\n\n"); - var html_params = new Regex("(class|target|rel)=\"(.|\n)*?\"", RegexCompileFlags.CASELESS); - var simplified = html_params.replace(divided, -1, 0, ""); + var html_params = new Regex ("(class|target|rel)=\"(.|\n)*?\"", RegexCompileFlags.CASELESS); + var simplified = html_params.replace (divided, -1, 0, ""); while (simplified.has_suffix ("\n")) simplified = simplified.slice (0, simplified.last_index_of ("\n")); - return simplified; + return escape_pango_entities (simplified); } - public static string uri_encode (string content) { - var to_escape = ";&+"; - return Soup.URI.encode (content, to_escape); + public static string uri_encode (string str) { + var restored = restore_entities (str); + return Soup.URI.encode (restored, ";&+"); } } diff --git a/src/ImageCache.vala b/src/ImageCache.vala deleted file mode 100644 index cd625a8..0000000 --- a/src/ImageCache.vala +++ /dev/null @@ -1,148 +0,0 @@ -using Soup; -using GLib; -using Gdk; -using Json; - -private struct CachedImage { - - public string uri; - public int size; - - public CachedImage (string _uri, int _size) { - uri = _uri; - size = _size; - } - - public static uint hash(CachedImage? c) { - assert (c != null); - assert (c.uri != null); - return GLib.int64_hash (c.size) ^ c.uri.hash (); - } - - public static bool equal (CachedImage? a, CachedImage? b) { - if (a == null || b == null) - return false; - return a.size == b.size && a.uri == b.uri; - } - -} - -public delegate void PixbufCallback (Gdk.Pixbuf pb); - -public class Tootle.ImageCache : GLib.Object { - - private GLib.HashTable