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

[MM-60408] Replaced chars with HTML entities in reminder posts #409

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

raghavaggarwal2308
Copy link
Contributor

Summary

  • Replaced chars with HTML entities in reminder posts

Screenshots

Before:
image

After:
image

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-60408

@raghavaggarwal2308 raghavaggarwal2308 self-assigned this Sep 6, 2024
@raghavaggarwal2308 raghavaggarwal2308 added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Sep 6, 2024
@raghavaggarwal2308 raghavaggarwal2308 added the 3: Security Review Review requested from Security Team label Sep 6, 2024
@raghavaggarwal2308 raghavaggarwal2308 removed 2: Dev Review Requires review by a core committer 3: Security Review Review requested from Security Team labels Sep 10, 2024
@AayushChaudhary0001
Copy link

@raghavaggarwal2308 This PR was reviewed and I found an issue regarding some markdowns
Please refer the below screenshots:-

on MS calendar
image

on MM
image

This seems to have a handling issue on Mattermost, please verify the same.

@Kshitij-Katiyar
Copy link
Contributor

Kshitij-Katiyar commented Oct 23, 2024

@raghavaggarwal2308 This PR was reviewed and I found an issue regarding some markdowns Please refer the below screenshots:-

on MS calendar image

on MM image

This seems to have a handling issue on Mattermost, please verify the same.

Hey @AayushChaudhary0001, The issue you reported is unrelated to this PR.
However a similar issue is found in the reminder post, A MSCalendar event with the ````test```$$qa$$new##few##` title is rendered as below
Screenshot from 2024-10-23 16-12-28
The issue you reported and the issue I have reported are related to the rendering of slack attachments only.

I looked into this issue but the MarkdownToHTMLEntities is working fine and converting the event subject to an equivalent HTML entity. The problem is with the rendering of slack attachment on the mattermost side.
@hanzei @wiggin77 Do you have an idea on this?

@hanzei
Copy link
Collaborator

hanzei commented Oct 25, 2024

That seems odd. Are we using a different rendering method in message attachments?

@Kshitij-Katiyar
Copy link
Contributor

Kshitij-Katiyar commented Oct 28, 2024

That seems odd. Are we using a different rendering method in message attachments?

@hanzei
We convert reserved Markdown characters to their HTML entity equivalents and then use bot.Poster's DMWithAttachments function to send the attachment which internally uses model.ParseSlackAttachment function on the MM side.

@Kshitij-Katiyar
Copy link
Contributor

Kshitij-Katiyar commented Nov 6, 2024

@raghavaggarwal2308 This PR was reviewed and I found an issue regarding some markdowns Please refer the below screenshots:-

on MS calendar image

on MM image

This seems to have a handling issue on Mattermost, please verify the same.

We have created an issue for this on the MM repo. The issue will be fixed once it's fixed on MM. We can move ahead with this PR for now

Copy link

@AayushChaudhary0001 AayushChaudhary0001 left a comment

Choose a reason for hiding this comment

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

Approving this PR, since a new Github issue has been created for the issue reported above

@raghavaggarwal2308 raghavaggarwal2308 added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Nov 12, 2024
@raghavaggarwal2308 raghavaggarwal2308 merged commit 22296c0 into master Nov 12, 2024
6 checks passed
@raghavaggarwal2308 raghavaggarwal2308 deleted the MM-60408 branch November 12, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants