Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
b63289ba
Verified
Commit
b63289ba
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup @room escape logic a bit
parent
c853dd35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Utils.cpp
+3
-2
3 additions, 2 deletions
src/Utils.cpp
with
3 additions
and
2 deletions
src/Utils.cpp
+
3
−
2
View file @
b63289ba
...
...
@@ -64,6 +64,8 @@ utils::stripReplyFromBody(const std::string &bodyi)
body
.
remove
(
plainQuote
);
if
(
body
.
startsWith
(
"
\n
"
))
body
.
remove
(
0
,
1
);
body
.
replace
(
"@room"
,
QString
::
fromUtf8
(
"@\u2060room"
));
return
body
.
toStdString
();
}
...
...
@@ -73,7 +75,7 @@ utils::stripReplyFromFormattedBody(const std::string &formatted_bodyi)
QString
formatted_body
=
QString
::
fromStdString
(
formatted_bodyi
);
formatted_body
.
remove
(
QRegularExpression
(
"<mx-reply>.*</mx-reply>"
,
QRegularExpression
::
DotMatchesEverythingOption
));
formatted_body
.
replace
(
"@room"
,
"@\u2060room"
);
formatted_body
.
replace
(
"@room"
,
QString
::
fromUtf8
(
"@\u2060room"
)
)
;
return
formatted_body
.
toStdString
();
}
...
...
@@ -91,7 +93,6 @@ utils::stripReplyFallbacks(const TimelineEvent &event, std::string id, QString r
related
.
quoted_body
=
QString
::
fromStdString
(
stripReplyFromBody
(
related
.
quoted_body
.
toStdString
()));
related
.
quoted_body
=
utils
::
getQuoteBody
(
related
);
related
.
quoted_body
.
replace
(
"@room"
,
QString
::
fromUtf8
(
"@\u2060room"
));
// get quoted body and strip reply fallback
related
.
quoted_formatted_body
=
mtx
::
accessors
::
formattedBodyWithFallback
(
event
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment