Version in base suite: 0.9.1-2.6 Base version: presage_0.9.1-2.6 Target version: presage_0.9.1-2.6+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/p/presage/presage_0.9.1-2.6.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/p/presage/presage_0.9.1-2.6+deb13u1.dsc changelog | 10 ++ patches/allow-words-with-apostrophes-to-be-predicted.patch | 59 +++++++++++++ patches/fix-bug-776720.patch | 17 --- patches/series | 1 4 files changed, 70 insertions(+), 17 deletions(-) diff -Nru presage-0.9.1/debian/changelog presage-0.9.1/debian/changelog --- presage-0.9.1/debian/changelog 2023-10-12 13:24:57.000000000 +0000 +++ presage-0.9.1/debian/changelog 2025-08-11 15:02:57.000000000 +0000 @@ -1,3 +1,13 @@ +presage (0.9.1-2.6+deb13u1) trixie; urgency=medium + + * debian/patches: + + Add allow-words-with-apostrophes-to-be-predicted.patch. Support suggesting + words containing apostrophes. Don't crash maliit-server / lomiri-keyboard + / lomiri when using /usr/lib/lomiri-keyboard/plugins/en/database_en.db + presage DB. (Closes: #770831, LP:#1384800). + + -- Mike Gabriel Mon, 11 Aug 2025 17:02:57 +0200 + presage (0.9.1-2.6) unstable; urgency=medium * Non-maintainer upload. diff -Nru presage-0.9.1/debian/patches/allow-words-with-apostrophes-to-be-predicted.patch presage-0.9.1/debian/patches/allow-words-with-apostrophes-to-be-predicted.patch --- presage-0.9.1/debian/patches/allow-words-with-apostrophes-to-be-predicted.patch 1970-01-01 00:00:00.000000000 +0000 +++ presage-0.9.1/debian/patches/allow-words-with-apostrophes-to-be-predicted.patch 2025-08-11 15:01:43.000000000 +0000 @@ -0,0 +1,59 @@ +Description: Allow words with apostrophes to be predicted + Stop the tokenizer from splitting based on apostrophes and allow for the + escaping of words containing apostrophes in the database connector. +Author: Mike Gabriel +Forwarded: https://sourceforge.net/p/presage/patches/2/ +Bug-Ubuntu: https://launchpad.net/bugs/1384800 +Comment: + Derived from an earlier patch version by Michael Sheldon + (dropping libboost as + build requirement). + + +--- a/src/lib/core/charsets.h ++++ b/src/lib/core/charsets.h +@@ -180,7 +180,6 @@ + '$', + '%', + '&', +- '\'', + '(', + ')', + '*', +--- a/src/lib/predictors/dbconnector/databaseConnector.cpp ++++ b/src/lib/predictors/dbconnector/databaseConnector.cpp +@@ -293,12 +293,17 @@ + + std::string DatabaseConnector::sanitizeString(const std::string str) const + { +- // TODO +- // just return the string for the time being +- // REVISIT +- // TO BE DONE +- // TBD +- return str; ++ std::string sanitized = str; ++ const std::string search = "'"; ++ const std::string replace = "''"; ++ ++ // Escape single quotes ++ size_t pos = 0; ++ while ((pos = sanitized.find(search, pos)) != std::string::npos) { ++ sanitized.replace(pos, search.length(), replace); ++ pos += replace.length(); ++ } ++ return sanitized; + } + + int DatabaseConnector::extractFirstInteger(const NgramTable& table) const +--- a/src/tools/text2ngram.cpp ++++ b/src/tools/text2ngram.cpp +@@ -174,7 +174,7 @@ + std::ifstream infile(argv[i]); + ForwardTokenizer tokenizer(infile, + " \f\n\r\t\v ", +- "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<«»"); ++ "`~!@#$%^&*()_-+=\\|]}[{\";:/?.>,<«»"); + tokenizer.lowercaseMode(lowercase); + + // take care of first N-1 tokens diff -Nru presage-0.9.1/debian/patches/fix-bug-776720.patch presage-0.9.1/debian/patches/fix-bug-776720.patch --- presage-0.9.1/debian/patches/fix-bug-776720.patch 2022-11-27 13:02:27.000000000 +0000 +++ presage-0.9.1/debian/patches/fix-bug-776720.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Fix bug #776720 ---- a/apps/gtk/gprompter/Makefile.am -+++ b/apps/gtk/gprompter/Makefile.am -@@ -253,10 +253,10 @@ - gprompter_CFLAGS = $(GNOME_CFLAGS) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) \ - -I$(top_srcdir)/src/lib \ - -I$(srcdir)/scintilla/include --gprompter_LDADD = $(GNOME_LIBS) $(GTHREAD_LIBS) $(GMODULE_LIBS) \ -- -lm \ -+gprompter_LDADD = libscintilla.la \ - ../../../src/lib/libpresage.la \ -- libscintilla.la -+ $(GNOME_LIBS) $(GTHREAD_LIBS) $(GMODULE_LIBS) \ -+ -lm - if USE_GCC - gprompter_LDADD += -lstdc++ - endif diff -Nru presage-0.9.1/debian/patches/series presage-0.9.1/debian/patches/series --- presage-0.9.1/debian/patches/series 2023-10-12 13:24:57.000000000 +0000 +++ presage-0.9.1/debian/patches/series 2025-08-11 15:02:57.000000000 +0000 @@ -4,3 +4,4 @@ sfos/docs-Install-css-too.patch sfos/text2ngram-Add-and-to-separators.patch sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch +allow-words-with-apostrophes-to-be-predicted.patch