summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-12-19 00:49:41 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-12-19 00:49:41 +0100
commit8d7175b702e773800cae013195ce6a746a6dbc55 (patch)
tree194847c0e42d54cef7fab9a3b87dad409d2f515d /src
parentMerge pull request #1640 from q234rty/fix-slow-new-window-plasma-6 (diff)
downloadnheko-8d7175b702e773800cae013195ce6a746a6dbc55.tar.xz
Fix backslashes escapes
(And shrug losing arms in replies)
Diffstat (limited to 'src')
-rw-r--r--src/timeline/InputBar.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index bcb30aa0..d37e403f 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -461,11 +461,11 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow
         text.body = replaceMatrixToMarkdownLink(msg.trimmed()).toStdString();
 
         // Don't send formatted_body, when we don't need to
-        // Specifically, if it includes no html tag and no newlines (which behave differently in
-        // formatted bodies). Probably we forgot something, so this might need to expand at some
-        // point.
+        // Specifically, if it includes no html tag and no newlines or
+        // backslashes (which behave differently in formatted bodies). Probably
+        // we forgot something, so this might need to expand at some point.
         if (text.formatted_body.find('<') == std::string::npos &&
-            text.body.find('\n') == std::string::npos)
+            text.body.find('\n') == std::string::npos && text.body.find('\\') == std::string::npos)
             text.formatted_body = "";
         else
             text.format = "org.matrix.custom.html";
@@ -880,7 +880,7 @@ InputBar::command(const QString &command, QString args)
                                       err->matrix_error.error);
           });
     } else if (command == QLatin1String("shrug")) {
-        message("¯\\_(ツ)_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args));
+        message("¯\\\\\\_(ツ)\\_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args));
     } else if (command == QLatin1String("fliptable")) {
         message(QStringLiteral("(╯°□°)╯︵ ┻━┻"));
     } else if (command == QLatin1String("unfliptable")) {