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

[stable24] Fix HTML entities not decoded in comment just added #35100

Merged
merged 3 commits into from
Nov 24, 2022

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Nov 11, 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
9 tasks
@blizzz blizzz requested review from a team, PVince81, artonge and skjnldsv and removed request for a team November 23, 2022 17:26
@blizzz blizzz added the 3. to review Waiting for reviews label Nov 23, 2022
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 /

@blizzz
Copy link
Member

blizzz commented Nov 24, 2022

still conflicts? 🤷

@danxuliu
Copy link
Member

/compile /

This will make possible to use it from files other than
"GetComments.js".

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
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 <[email protected]>
@danxuliu
Copy link
Member

/compile /

Signed-off-by: nextcloud-command <[email protected]>
@blizzz blizzz merged commit bee43e2 into stable24 Nov 24, 2022
@blizzz blizzz deleted the backport/35054/stable24 branch November 24, 2022 20:18
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.

4 participants