From cbfa9112df4dec824cf6101907299a164d4006c2 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 26 Apr 2024 22:59:00 +0200 Subject: [PATCH 1/9] geniuspaste: Port to libsoup3 --- build/geniuspaste.m4 | 2 +- geniuspaste/README | 2 +- geniuspaste/src/geniuspaste.c | 89 +++++++++++++++++++++-------------- 3 files changed, 56 insertions(+), 37 deletions(-) diff --git a/build/geniuspaste.m4 b/build/geniuspaste.m4 index dce1ab538..f37f22c46 100644 --- a/build/geniuspaste.m4 +++ b/build/geniuspaste.m4 @@ -3,7 +3,7 @@ AC_DEFUN([GP_CHECK_GENIUSPASTE], GP_ARG_DISABLE([GeniusPaste], [auto]) GP_CHECK_PLUGIN_DEPS([GeniusPaste], GENIUSPASTE, - [libsoup-2.4 >= 2.4.0]) + [libsoup-3.0]) GP_COMMIT_PLUGIN_STATUS([GeniusPaste]) diff --git a/geniuspaste/README b/geniuspaste/README index 436d264b5..a8a755638 100644 --- a/geniuspaste/README +++ b/geniuspaste/README @@ -36,7 +36,7 @@ configuration shipped with the plugin, please report the issue to: Requirements ------------ * GTK+ >= 2.12 - * libsoup 2.4 >= 2.4.0 + * libsoup 3.0 Installation ------------ diff --git a/geniuspaste/src/geniuspaste.c b/geniuspaste/src/geniuspaste.c index 27035bd01..8792a75f2 100644 --- a/geniuspaste/src/geniuspaste.c +++ b/geniuspaste/src/geniuspaste.c @@ -605,13 +605,15 @@ static SoupMessage *json_request_new(const gchar *method, { SoupMessage *msg = soup_message_new(method, url); GString *str = g_string_new(NULL); + GBytes *bytes; g_string_append_c(str, '{'); g_datalist_foreach(fields, append_json_data_item, str); g_string_append_c(str, '}'); - soup_message_set_request(msg, "application/json", SOUP_MEMORY_TAKE, - str->str, str->len); + bytes = g_bytes_new_take(str->str, str->len); g_string_free(str, FALSE); + soup_message_set_request_body_from_bytes(msg, "application/json", bytes); + g_bytes_unref(bytes); return msg; } @@ -657,7 +659,8 @@ static SoupMessage *pastebin_soup_message_new(const Pastebin *pastebin, default: case FORMAT_HTML_FORM_URLENCODED: - msg = soup_form_request_new_from_datalist(method, url, &data); + msg = soup_message_new_from_encoded_form(method, url, + soup_form_encode_datalist(&data)); break; } g_datalist_clear(&data); @@ -665,11 +668,21 @@ static SoupMessage *pastebin_soup_message_new(const Pastebin *pastebin, return msg; } +static gchar *bytes_to_string(GBytes *bytes) +{ + gsize bytes_size = g_bytes_get_size(bytes); + gchar *str = g_malloc(bytes_size + 1); + memcpy(str, g_bytes_get_data(bytes, NULL), bytes_size); + str[bytes_size] = 0; + return str; +} + /* parses @response and returns the URL of the paste, or %NULL on parse error * or if the URL couldn't be found. * @warning: it may return NULL even if @error is not set */ static gchar *pastebin_parse_response(const Pastebin *pastebin, SoupMessage *msg, + GBytes *response_body, GeanyDocument *doc, const gchar *contents, GError **error) @@ -684,7 +697,8 @@ static gchar *pastebin_parse_response(const Pastebin *pastebin, if (! g_key_file_has_group(pastebin->config, PASTEBIN_GROUP_PARSE)) { /* by default, use the response URI (redirect) */ - url = soup_uri_to_string(soup_message_get_uri(msg), FALSE); + url = g_uri_to_string_partial(soup_message_get_uri(msg), + G_URI_HIDE_PASSWORD); } else { @@ -695,7 +709,9 @@ static gchar *pastebin_parse_response(const Pastebin *pastebin, PASTEBIN_GROUP_PARSE_KEY_REPLACE, "\\1"); SETPTR(replace, expand_placeholders(replace, pastebin, doc, contents)); - url = regex_replace(search, msg->response_body->data, replace, error); + gchar *response_str = bytes_to_string(response_body); + url = regex_replace(search, response_str, replace, error); + g_free(response_str); g_free(search); g_free(replace); @@ -757,27 +773,21 @@ static void show_msgbox(GtkMessageType type, GtkButtonsType buttons, /* cppcheck-suppress memleak symbolName=dlg */ } -static void debug_log_message_body(SoupMessage *msg, - SoupMessageBody *body, - const gchar *label) +static void debug_logger(SoupLogger *logger, + SoupLoggerLogLevel level, + char direction, + const char *data, + gpointer user_data) { - if (geany->app->debug_mode) + const char *prefix; + switch (direction) { - gchar *real_uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE); - - soup_message_body_flatten(body); - msgwin_msg_add(COLOR_BLUE, -1, NULL, - "[geniuspaste] %s:\n" - "URI: %s\n" - "Body: %s\n" - "Code: %d (%s)", - label, - real_uri, - body->data, - msg->status_code, - msg->reason_phrase); - g_free(real_uri); + case '>': prefix = "Request: "; break; + case '<': prefix = "Response: "; break; + default: prefix = ""; break; } + + msgwin_msg_add(COLOR_BLUE, -1, NULL, "[geniuspaste] %s%s", prefix, data); } static void paste(GeanyDocument * doc, const gchar * website) @@ -788,6 +798,8 @@ static void paste(GeanyDocument * doc, const gchar * website) SoupMessage *msg; gchar *user_agent = NULL; guint status; + GError *err = NULL; + GBytes *response; g_return_if_fail(doc && doc->is_valid); @@ -816,35 +828,40 @@ static void paste(GeanyDocument * doc, const gchar * website) msg = pastebin_soup_message_new(pastebin, doc, f_content); user_agent = g_strconcat(PLUGIN_NAME, " ", PLUGIN_VERSION, " / Geany ", GEANY_VERSION, NULL); - session = soup_session_async_new_with_options(SOUP_SESSION_USER_AGENT, user_agent, NULL); + session = soup_session_new_with_options("user-agent", user_agent, NULL); + if (geany->app->debug_mode) + { + SoupLogger *logger = soup_logger_new(SOUP_LOGGER_LOG_BODY); + soup_logger_set_printer(logger, debug_logger, NULL, NULL); + soup_session_add_feature(session, SOUP_SESSION_FEATURE(logger)); + g_object_unref(logger); + } g_free(user_agent); - debug_log_message_body(msg, msg->request_body, "Request"); - - status = soup_session_send_message(session, msg); + response = soup_session_send_and_read(session, msg, NULL, &err); g_object_unref(session); - debug_log_message_body(msg, msg->response_body, "Response"); - - if (! SOUP_STATUS_IS_SUCCESSFUL(status)) + status = soup_message_get_status(msg); + if (err || ! SOUP_STATUS_IS_SUCCESSFUL(status)) { show_msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Failed to paste the code"), _("Error pasting the code to the pastebin service %s.\n" "Error code: %u (%s).\n\n%s"), - pastebin->name, status, msg->reason_phrase, - (SOUP_STATUS_IS_TRANSPORT_ERROR(status) + pastebin->name, status, + err ? err->message : soup_message_get_reason_phrase(msg), + (err ? _("Check your connection or the pastebin configuration and retry.") : SOUP_STATUS_IS_SERVER_ERROR(status) ? _("Wait for the service to come back and retry, or retry " "with another pastebin service.") : _("Check the pastebin configuration and retry."))); + g_clear_error(&err); } else { - GError *err = NULL; - gchar *p_url = pastebin_parse_response(pastebin, msg, doc, f_content, - &err); + gchar *p_url = pastebin_parse_response(pastebin, msg, response, doc, + f_content, &err); if (err || ! p_url) { @@ -876,6 +893,8 @@ static void paste(GeanyDocument * doc, const gchar * website) g_free(p_url); } + if (response) + g_bytes_unref(response); g_object_unref(msg); g_free(f_content); } From 8e254b889c1f0c08d0b43fca8e21535095f04785 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 28 Apr 2024 21:34:34 +0200 Subject: [PATCH 2/9] Update CI for libsoup3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Enrico Tröger --- .github/workflows/build.yml | 8 +++++--- build/ci_mingw64_geany_plugins.sh | 2 +- build/gtk-bundle-from-msys2.sh | 9 +++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ca9b6cf7..71ae8de0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ env: jobs: linux: name: Linux Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: CC: ccache gcc @@ -111,7 +111,7 @@ jobs: # geany autopoint gettext - python-docutils + python3-docutils # geany-plugins intltool check @@ -128,16 +128,18 @@ jobs: libgtkspell3-3-dev # geaniuspaste/updatechecker libsoup2.4-dev + libsoup-3.0-dev # git-changebar libgit2-dev # markdown libmarkdown2-dev # markdown/webhelper libwebkit2gtk-4.0-dev + libwebkit2gtk-4.1-dev # pretty-printer libxml2-dev # spellcheck - libenchant-dev + libenchant-2-dev # cppcheck cmake libpcre3-dev diff --git a/build/ci_mingw64_geany_plugins.sh b/build/ci_mingw64_geany_plugins.sh index 2409d7d2a..3b2542a8b 100644 --- a/build/ci_mingw64_geany_plugins.sh +++ b/build/ci_mingw64_geany_plugins.sh @@ -181,7 +181,7 @@ install_dependencies() { mingw-w64-${ARCH}-gpgme \ mingw-w64-${ARCH}-gtkspell3 \ mingw-w64-${ARCH}-libgit2 \ - mingw-w64-${ARCH}-libsoup \ + mingw-w64-${ARCH}-libsoup3 \ mingw-w64-${ARCH}-lua51 } diff --git a/build/gtk-bundle-from-msys2.sh b/build/gtk-bundle-from-msys2.sh index 66419d178..7dc8fc1f9 100644 --- a/build/gtk-bundle-from-msys2.sh +++ b/build/gtk-bundle-from-msys2.sh @@ -21,7 +21,7 @@ EXE_WRAPPER_64="mingw-w64-x86_64-wine" # enchant, hunspell - for SpellCheck plugin # lua51 - for GeanyLua plugin # gnupg, gpgme - for GeanyPG plugin -# libsoup - for UpdateChecker plugin +# libsoup3 - for UpdateChecker & GeniusPaste plugins # libgit2 - for GitChangeBar plugin # gtkspell3 - for GeanyVC plugin # the rest is dependency-dependency @@ -29,9 +29,12 @@ packages=" ca-certificates ctags ctpl-git +curl enchant +glib-networking gnupg gpgme +gsettings-desktop-schemas http-parser hunspell libassuan @@ -39,8 +42,9 @@ libgcrypt libgit2 libgpg-error libidn2 +libproxy libpsl -libsoup +libsoup3 libssh2 libsystre libunistring @@ -51,6 +55,7 @@ p11-kit readline sqlite3 termcap +zstd " gtk3_dependency_pkgs=" From 0f39c188cc00f0844f2c2bc63266f6e6298cf8d2 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 26 Apr 2024 23:05:13 +0200 Subject: [PATCH 3/9] geniuspaste: Remove use of deprecated GTK API --- build/geniuspaste.m4 | 3 ++- geniuspaste/README | 2 +- geniuspaste/src/geniuspaste.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/geniuspaste.m4 b/build/geniuspaste.m4 index f37f22c46..926a6dfde 100644 --- a/build/geniuspaste.m4 +++ b/build/geniuspaste.m4 @@ -3,7 +3,8 @@ AC_DEFUN([GP_CHECK_GENIUSPASTE], GP_ARG_DISABLE([GeniusPaste], [auto]) GP_CHECK_PLUGIN_DEPS([GeniusPaste], GENIUSPASTE, - [libsoup-3.0]) + [gtk+-3.0 >= 3.16 + libsoup-3.0]) GP_COMMIT_PLUGIN_STATUS([GeniusPaste]) diff --git a/geniuspaste/README b/geniuspaste/README index a8a755638..0fcd08ad2 100644 --- a/geniuspaste/README +++ b/geniuspaste/README @@ -35,7 +35,7 @@ configuration shipped with the plugin, please report the issue to: Requirements ------------ - * GTK+ >= 2.12 + * GTK+ >= 3.16 * libsoup 3.0 Installation diff --git a/geniuspaste/src/geniuspaste.c b/geniuspaste/src/geniuspaste.c index 8792a75f2..81ca58e48 100644 --- a/geniuspaste/src/geniuspaste.c +++ b/geniuspaste/src/geniuspaste.c @@ -936,13 +936,13 @@ GtkWidget *plugin_configure(GtkDialog * dialog) gint i; GtkWidget *label, *vbox, *author_label; - vbox = gtk_vbox_new(FALSE, 6); + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); label = gtk_label_new(_("Select a pastebin:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0); author_label = gtk_label_new(_("Enter the author name:")); - gtk_misc_set_alignment(GTK_MISC(author_label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(author_label), 0); widgets.author_entry = gtk_entry_new(); From 36d8144b51898c73e1f84daf3e5b57512ba59474 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 26 Apr 2024 23:40:46 +0200 Subject: [PATCH 4/9] geniuspaste: Enable HTTPS for paste.debian.net --- geniuspaste/data/paste.debian.net.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geniuspaste/data/paste.debian.net.conf b/geniuspaste/data/paste.debian.net.conf index a6d39a70c..a2eaf3e32 100644 --- a/geniuspaste/data/paste.debian.net.conf +++ b/geniuspaste/data/paste.debian.net.conf @@ -1,6 +1,6 @@ [pastebin] name=paste.debian.net -url=http://paste.debian.net/ +url=https://paste.debian.net/ [format] code=%contents% From 7dd59a5a0d05abdd6016393cf74e07f0f25ab15a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 29 Apr 2024 00:38:05 +0200 Subject: [PATCH 5/9] geniuspaste: Replace dead dpaste.de with dpaste.org --- geniuspaste/data/Makefile.am | 2 +- .../data/{dpaste.de.conf => dpaste.org.conf} | 32 ++++++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) rename geniuspaste/data/{dpaste.de.conf => dpaste.org.conf} (63%) diff --git a/geniuspaste/data/Makefile.am b/geniuspaste/data/Makefile.am index 4469ea85a..ef400db22 100644 --- a/geniuspaste/data/Makefile.am +++ b/geniuspaste/data/Makefile.am @@ -4,7 +4,7 @@ plugin = geniuspaste pastebinsdir = $(plugindatadir)/pastebins dist_pastebins_DATA = \ codepad.org.conf \ - dpaste.de.conf \ + dpaste.org.conf \ fpaste.org.conf \ pastebin.geany.org.conf \ paste.debian.net.conf \ diff --git a/geniuspaste/data/dpaste.de.conf b/geniuspaste/data/dpaste.org.conf similarity index 63% rename from geniuspaste/data/dpaste.de.conf rename to geniuspaste/data/dpaste.org.conf index d17ea70b5..62f324c28 100644 --- a/geniuspaste/data/dpaste.de.conf +++ b/geniuspaste/data/dpaste.org.conf @@ -1,6 +1,6 @@ [pastebin] -name=dpaste.de -url=https://dpaste.de/api/ +name=dpaste.org +url=https://dpaste.org/api/ [format] filename=%title% @@ -13,30 +13,35 @@ search=^"(.+)"$ replace=\1 [defaults] -# default language to plain which means "Code" -language=plain -expire=604800 +language=_code +expire=2592000 # map GeanyFileType=PastebinFileType [languages] -# list as of 2016-01-14 -None=text +None=_text ActionScript=as +Arduino=arduino +Batch=bat C=c -# better than nothing +# better than nothing, because the configuration has "cpp" disabled C++=c -#CAML=ocaml +C#=csharp +CAML=ocaml Clojure=clojure +CMake=cmake COBOL=cobol +CoffeeScript=coffee-script Conf=ini CSS=css CUDA=cuda +D=d Diff=diff Docbook=xml Erlang=erlang F77=fortran +Forth=forth Fortran=fortran -GLSL=C +GLSL=glsl Go=go Haskell=haskell HTML=html @@ -44,10 +49,12 @@ Java=java Javascript=js JSON=json LaTeX=tex +Kotlin=kotlin +Lisp=common-lisp Lua=lua Make=make Matlab/Octave=matlab -Objective-C=objc +Objective-C=objective-c Perl=perl PHP=php PowerShell=powershell @@ -59,6 +66,7 @@ Scala=scala Sh=bash SQL=sql Tcl=tcl +Swift=swift XML=xml YAML=yaml -Zephir=php +Zephir=zephir From a597d08555a6263035ae68f509b9f9f37e0a42d5 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 29 Apr 2024 00:38:43 +0200 Subject: [PATCH 6/9] geniuspaste: Add dpaste.com --- geniuspaste/data/Makefile.am | 1 + geniuspaste/data/dpaste.com.conf | 89 ++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 geniuspaste/data/dpaste.com.conf diff --git a/geniuspaste/data/Makefile.am b/geniuspaste/data/Makefile.am index ef400db22..5c11cb6e8 100644 --- a/geniuspaste/data/Makefile.am +++ b/geniuspaste/data/Makefile.am @@ -4,6 +4,7 @@ plugin = geniuspaste pastebinsdir = $(plugindatadir)/pastebins dist_pastebins_DATA = \ codepad.org.conf \ + dpaste.com.conf \ dpaste.org.conf \ fpaste.org.conf \ pastebin.geany.org.conf \ diff --git a/geniuspaste/data/dpaste.com.conf b/geniuspaste/data/dpaste.com.conf new file mode 100644 index 000000000..601bd4854 --- /dev/null +++ b/geniuspaste/data/dpaste.com.conf @@ -0,0 +1,89 @@ +[pastebin] +name=dpaste.com +url=https://dpaste.com/api/v2/ + +[format] +content=%contents% +title=%title% +syntax=%language% +#expiry_days=%expire_days% +poster=%user% + +[parse] + +[defaults] +language=plain +expire_days=7 + +# map GeanyFileType=PastebinFileType +[languages] +ActionScript=actionscript +Ada=ada +Arduino=arduino +AutoIt=autoit +Batch=batch +BibTeX=bibtex +CAML=ocaml +C=c +C++=cpp +C#=csharp +Clojure=clojure +CMake=cmake +COBOL=cobol +CoffeeScript=coffeescript +Conf=ini +CSS=css +CUDA=cuda +Cython=cython +D=d +Diff=diff +Docbook=xml +Erlang=erlang +F77=fortran +Forth=forth +Fortran=fortran +GDScript=gdscript +GLSL=glsl +Go=go +Graphviz=graphviz +Groovy=groovy +Haskell=haskell +Haxe=haxe +HTML=html +Java=java +Javascript=js +JSON=json +Julia=julia +Kotlin=kotlin +Lisp=common-lisp +Lua=lua +Make=make +Markdown=md +Matlab/Octave=octave +Meson=meson +Nim=nimrod +NSIS=nsis +Objective-C=objective-c +Perl=perl +PHP=php +Po=pot +PowerShell=powershell +Python=python +reStructuredText=rst +Raku=perl6 +Ruby=rb +Rust=rust +Scala=scala +Sh=bash +Smalltalk=smalltalk +SQL=sql +Swift=swift +Tcl=tcl +TypeScript=ts +Vala=vala +Verilog=verilog +VHDL=vhdl +XML=xml +YAML=yaml +Zephir=zephir +None=text From 1699a70e34e918699b9bce288c768d03f2112f28 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 16 May 2024 00:11:54 +0200 Subject: [PATCH 7/9] geniuspaste: Silence a harmless warning with GLib 2.76+ --- geniuspaste/src/geniuspaste.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geniuspaste/src/geniuspaste.c b/geniuspaste/src/geniuspaste.c index 81ca58e48..97beafbc2 100644 --- a/geniuspaste/src/geniuspaste.c +++ b/geniuspaste/src/geniuspaste.c @@ -611,7 +611,7 @@ static SoupMessage *json_request_new(const gchar *method, g_datalist_foreach(fields, append_json_data_item, str); g_string_append_c(str, '}'); bytes = g_bytes_new_take(str->str, str->len); - g_string_free(str, FALSE); + (void) g_string_free(str, FALSE); /* buffer already taken above */ soup_message_set_request_body_from_bytes(msg, "application/json", bytes); g_bytes_unref(bytes); From a4264b44e39f3f1a902e6a77e42db2da143f4fdd Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 20 May 2024 22:54:32 +0200 Subject: [PATCH 8/9] geniuspaste: Update TODO --- geniuspaste/TODO | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geniuspaste/TODO b/geniuspaste/TODO index 46fb353ed..99e3744ab 100644 --- a/geniuspaste/TODO +++ b/geniuspaste/TODO @@ -2,5 +2,7 @@ TODO ---- - recent pastes history - - URL shortening - + - URL shortening (?) + - authentication (per-pastebin) + - confirmation dialog/infobar? pasted data is potentially sensitive + - support for Gist, which is likely the most used service From 4e93f0bfbd62b08666b6d2d7e2675b841e9943a4 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 21 May 2024 00:16:10 +0200 Subject: [PATCH 9/9] geniuspaste: Fix replace configurations with GLib 2.79+ We used the invalid single-backslash in pastebin configurations, which used to work fine for our case until GLib 2.79. Fix this by using proper double-backslashes which work with all versions. --- geniuspaste/data/dpaste.org.conf | 2 +- geniuspaste/data/fpaste.org.conf | 2 +- geniuspaste/data/pastebin.geany.org.conf | 2 +- geniuspaste/data/sprunge.us.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/geniuspaste/data/dpaste.org.conf b/geniuspaste/data/dpaste.org.conf index 62f324c28..85ee10a9d 100644 --- a/geniuspaste/data/dpaste.org.conf +++ b/geniuspaste/data/dpaste.org.conf @@ -10,7 +10,7 @@ lexer=%language% [parse] search=^"(.+)"$ -replace=\1 +replace=\\1 [defaults] language=_code diff --git a/geniuspaste/data/fpaste.org.conf b/geniuspaste/data/fpaste.org.conf index 4c74a248b..f2c26466d 100644 --- a/geniuspaste/data/fpaste.org.conf +++ b/geniuspaste/data/fpaste.org.conf @@ -17,7 +17,7 @@ title=%title% [parse] search="url" *: *"([^"]+)" -replace=\1 +replace=\\1 # map GeanyFileType=PastebinFileType [languages] diff --git a/geniuspaste/data/pastebin.geany.org.conf b/geniuspaste/data/pastebin.geany.org.conf index a7e9f3d4b..0e1fdac98 100644 --- a/geniuspaste/data/pastebin.geany.org.conf +++ b/geniuspaste/data/pastebin.geany.org.conf @@ -11,7 +11,7 @@ lexer=%language% [parse] search=^.+$ -replace=\0 +replace=\\0 [defaults] language=text diff --git a/geniuspaste/data/sprunge.us.conf b/geniuspaste/data/sprunge.us.conf index 0ef60c4bf..85e0868ed 100644 --- a/geniuspaste/data/sprunge.us.conf +++ b/geniuspaste/data/sprunge.us.conf @@ -7,7 +7,7 @@ sprunge=%contents% [parse] search=^[[:space:]]*(.+?)[[:space:]]*$ -replace=\1?%language% +replace=\\1?%language% # map GeanyFileType=PastebinFileType [languages]