Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable25] Fix HTML entities not decoded in comment just added #35085

Merged
merged 3 commits into from
Nov 24, 2022

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Nov 10, 2022

  • ⚠️ This backport had conflicts and is incomplete

backport of #35054

@danxuliu
Copy link
Member

/compile amend /

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@blizzz blizzz mentioned this pull request Nov 21, 2022
1 task
@blizzz blizzz added the 3. to review Waiting for reviews label Nov 21, 2022
@blizzz blizzz requested review from a team, PVince81, Pytal and szaimen and removed request for a team November 23, 2022 16:58
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@szaimen
Copy link
Contributor

szaimen commented Nov 23, 2022

Conflicts...

@blizzz
Copy link
Member

blizzz commented Nov 23, 2022

/compile amend /

danxuliu and others added 3 commits November 24, 2022 01:19
This will make possible to use it from files other than
"GetComments.js".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The XML data received from the comments endpoint has an inconsistent
encoding; some entities are encoded once and others are encoded twice.
When the comment list is loaded the comments are fetched using
GetComments, which handles all that, and therefore shows the messages
and author names as expected.

However, when a new comment is posted the list is not got again; instead
the new comment is loaded from the comment data returned after posting
it. This is done in NewComment, which did not decode the messages nor
the author names, and therefore showed, for example, "&amp;" instead of
"&".

To solve that now the same decoding logic used in GetComments is applied
too in NewComment.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@Pytal
Copy link
Member

Pytal commented Nov 24, 2022

Rebased + recompiled

@blizzz blizzz merged commit d3fae80 into stable25 Nov 24, 2022
@blizzz blizzz deleted the backport/35054/stable25 branch November 24, 2022 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants