diff --git a/data/db/init.sql b/data/db/init.sql index 0e75368..bfd82e4 100644 --- a/data/db/init.sql +++ b/data/db/init.sql @@ -108,7 +108,7 @@ CREATE INDEX IF NOT EXISTS link_sources__both ON link_sources(link, domain); CREATE INDEX tag_favs_index ON fav_tags(tag, fav); CREATE INDEX fav_tags_index ON fav_tags(fav, tag); {% endif %} -INSERT OR IGNORE INTO vocab("odysseus:myvocab.ttl#", "", 1.0); +INSERT OR IGNORE INTO vocab VALUES ("odysseus:myvocab.ttl#", "", 1.0); PRAGMA user_version = 8; END TRANSACTION; diff --git a/src/Services/Prosody/lib.vala b/src/Services/Prosody/lib.vala index 9538e0a..df0c934 100644 --- a/src/Services/Prosody/lib.vala +++ b/src/Services/Prosody/lib.vala @@ -734,7 +734,7 @@ namespace Odysseus.Templating.Std { escapes["csv"] = Writer.build_escapes("'\"", "\\'", "\\\""); // These escape codes taken from Django // https://github.com/django/django/blob/9718fa2e8abe430c3526a9278dd976443d4ae3c6/django/utils/html.py#L51 - var escape_js_string = Writer.build_escapes("\\\"><&=-;\x2028\x2029'", + var escape_js_string = Writer.build_escapes("\\\"><&=-;\0x2028\0x2029'", "\\u005C", "\\u0022", "\\u003E", "\\u003C", "\\u0026", "\\u003D", "\\u002D", "\\u003B", "\\u2028", "\\u2029"); // Escape every ASCII character with a value less than 32. diff --git a/src/Widgets/overlays/Bookmarker.vala b/src/Widgets/overlays/Bookmarker.vala index 59fc0ca..9c9c72c 100644 --- a/src/Widgets/overlays/Bookmarker.vala +++ b/src/Widgets/overlays/Bookmarker.vala @@ -76,7 +76,7 @@ public class Odysseus.Bookmarker : Gtk.Popover { private static Sqlite.Statement Qinsert_favs = Database.parse("INSERT OR REPLACE INTO favs VALUES (?, ?, ?);"); private static Sqlite.Statement Qdelete_toks = Database.parse("DELETE FROM fav_tags WHERE fav = ?;"); private static Sqlite.Statement Qinsert_tok = Database.parse("INSERT OR IGNORE INTO fav_tags VALUES (?, ?);"); - private static Sqlite.Statement Qinsert_tag = Database.parse("INSERT INTO tags VALUES (?, ?, (SELECT rowid FROM vocabs WHERE url = 'odysseus:myvocab.ttl#'));"); + private static Sqlite.Statement Qinsert_tag = Database.parse("INSERT INTO tags VALUES (?, ?, (SELECT rowid FROM vocab WHERE url = 'odysseus:myvocab.ttl#'));"); private static Sqlite.Statement Qinsert_label = Database.parse("INSERT INTO tag_labels VALUES (?, ?)"); public override void closed() { unowned Sqlite.Database db = Database.get_database();