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

htmlDecode text before copying #3238

Merged
merged 1 commit into from
May 31, 2021
Merged

htmlDecode text before copying #3238

merged 1 commit into from
May 31, 2021

Conversation

jasperhuangg
Copy link
Contributor

Details

Using the copy button would copy the actual message contents, which are HTML encoded since we store the raw HTML for each report action. This adds HTML decoding before we save the text to the clipboard.

Fixed Issues

Fixes #3217

Tests

  1. Send a message with special characters (<, >, ¥). Just hold any combination of [Option] and/or [Shift] and run your fingers across the entire keyword.
√©¥˙∆˜´Î˛ÎÏ˝◊ı˝Ó˜Ô¥∫å><≥≤˘¯˘˜ı◊ÏΡ˝◊ıÓÔ˜ÓÁÏŒ„´‰ˇÁ¨ˆÔÓ˝ÏÎç√∫˜
  1. Copy the message using the button in the report action context menu.
  2. Paste the message into the compose box. Verify it displays the same as when you sent it. Then send it and verify it also displays the same.

QA Steps

Same as the above tests.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

2021-05-31_15-43-40.mp4

Mobile Web

2021-05-31_15-59-22.mp4

Desktop

2021-05-31_15-49-56.mp4

iOS

2021-05-31_15-55-06.mp4

Android

2021-05-31_16-10-30.mp4

@jasperhuangg jasperhuangg requested a review from a team May 31, 2021 08:12
@jasperhuangg jasperhuangg self-assigned this May 31, 2021
@MelvinBot MelvinBot requested review from Beamanator and removed request for a team May 31, 2021 08:12
@jasperhuangg jasperhuangg marked this pull request as ready for review May 31, 2021 08:41
@jasperhuangg jasperhuangg requested a review from a team as a code owner May 31, 2021 08:41
@MelvinBot MelvinBot requested review from TomatoToaster and removed request for a team May 31, 2021 08:41
Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

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

LGTM!

Note: Some characters (like ˆ∆؈Ԅش˜) don't do weird things in main -> Other characters like < > do reproduce the problem & your PR fixes it 👍

@Beamanator Beamanator merged commit f41d405 into main May 31, 2021
@Beamanator Beamanator deleted the jasper-copySpecialChars branch May 31, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy to clipboard - Copying special characters outputs HTML encoding
2 participants