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

Fix HTML entity rendering in file comments sidebar #29029

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented Oct 1, 2021

Fix #28243

This fix decodes HTML entities contained in comment messages and displaynames.

Some characters are double-encoded, e.g. > - >, so we decode the strings twice. Full character to encoded version map:

  • > - > double-encoded
  • < - &amp;lt; double-encoded
  • & - &amp; encoded
  • " - &quot; encoded
  • ' - ' not encoded

Further work

Update backend XML encoder logic to address inconsistent encoding #29306

@Pytal Pytal added bug 3. to review Waiting for reviews labels Oct 1, 2021
@Pytal Pytal added this to the Nextcloud 23 milestone Oct 1, 2021
@Pytal Pytal requested review from PVince81 and a team October 1, 2021 22:38
@Pytal Pytal self-assigned this Oct 1, 2021
@Pytal Pytal requested review from artonge and szaimen and removed request for a team October 1, 2021 22:38
@Pytal

This comment has been minimized.

@Pytal
Copy link
Member Author

Pytal commented Oct 1, 2021

/backport to stable22

@Pytal
Copy link
Member Author

Pytal commented Oct 1, 2021

/backport to stable21

@Pytal Pytal force-pushed the fix/28243/render-html-entities branch from b81f217 to 110190b Compare October 4, 2021 21:14
@Pytal Pytal changed the title Fix HTML entity rendering in file comments Fix HTML entity rendering in file comments sidebar Oct 4, 2021
@Pytal

This comment has been minimized.

@nextcloud-command nextcloud-command force-pushed the fix/28243/render-html-entities branch from 110190b to 347b27c Compare October 4, 2021 21:35
@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81

This comment has been minimized.

@Pytal Pytal force-pushed the fix/28243/render-html-entities branch from 347b27c to 09f8666 Compare October 21, 2021 15:28
@Pytal
Copy link
Member Author

Pytal commented Oct 21, 2021

@tobiasKaminsky do clients render these correctly?

@Pytal

This comment has been minimized.

@nextcloud-command nextcloud-command force-pushed the fix/28243/render-html-entities branch from 09f8666 to f06f1d6 Compare October 21, 2021 20:37
@Pytal Pytal force-pushed the fix/28243/render-html-entities branch from f06f1d6 to e6abd38 Compare October 21, 2021 20:54
@Pytal
Copy link
Member Author

Pytal commented Oct 21, 2021

/compile amend /

@nextcloud-command nextcloud-command force-pushed the fix/28243/render-html-entities branch from e6abd38 to f332ba2 Compare October 21, 2021 21:15
@tobiasKaminsky
Copy link
Member

@tobiasKaminsky do clients render these correctly?

As far as I know this was only a problem on web ui side.

@skjnldsv skjnldsv mentioned this pull request Oct 25, 2021
25 tasks
@skjnldsv
Copy link
Member

As far as I know this was only a problem on web ui side.

It seems the server returns double-encoding data, can you coordinate with @Pytal and @PVince81 to make sure @tobiasKaminsky ? :)

@skjnldsv skjnldsv mentioned this pull request Nov 1, 2021
19 tasks
@tobiasKaminsky
Copy link
Member

Android:

  • input on Android: works
  • input on Server: we just show activity feed per file, so we show what server renders -> Android not affected

Desktop:

  • does not have comment function
  • only shows comments via activity stream

iOS:

  • could not test this PR
  • 22.0.0 is working correctly, so if you do not change anything on backend logic, but only how comments are displayed, it should be fine.

@blizzz blizzz mentioned this pull request Nov 3, 2021
18 tasks
@skjnldsv skjnldsv mentioned this pull request Nov 8, 2021
23 tasks
Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

Looks good to me, I will rebase it

@CarlSchwan CarlSchwan force-pushed the fix/28243/render-html-entities branch 2 times, most recently from b34dd35 to ce614ea Compare November 8, 2021 17:02
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@CarlSchwan CarlSchwan force-pushed the fix/28243/render-html-entities branch from ce614ea to e5873a2 Compare November 8, 2021 21:21
@CarlSchwan CarlSchwan merged commit d879299 into master Nov 8, 2021
@CarlSchwan CarlSchwan deleted the fix/28243/render-html-entities branch November 8, 2021 22:51
@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quotation marks get html escape in file comments
5 participants