microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

[BUG][mgt-chat] HTML tags visible after editing chat within MGT mgt-chat component

Open Laurence-V opened this issue 1 year ago • 3 comments

Describe the bug When editing in the mgt-chat component of MGT, the client renders HTML tags, these then persist on web/fat client if changes are made and saved. The HTML tags are not rendered in the mgt-chat component on saving.

To Reproduce Steps to reproduce the behavior in MGT:

  1. Go to a system running chats using MGT
  2. Click on a message you have sent to get the context menu and select Edit
  3. The message will become editable
  4. Error: The message now shows the HTML tags, while in Edit Mode

To see in Web/Fat client

  1. Make a change while in the MGT chat component, while in Edit Mode
  2. Accept change
  3. Go message to Web/Fat client
  4. Error: The message now shows the HTML tags

Expected behavior HTML tags should not be visible in the clients

Screenshots In Edit Mode in MGT Chat Component: Screenshot 2024-04-03 at 14 15 05 In fat client (not edit mode): Screenshot 2024-04-03 at 14 15 28 In web client (not edit mode): Screenshot 2024-04-03 at 14 14 45

Environment (please complete the following information):

  • Client OS: Mac Sonoma 14.4
  • Browser: Chrome Version 123.0.6312.86 (Official Build) (arm64)
  • Framework: React
  • Context: Microsoft Teams Graph Toolkit
  • Version 4

Laurence-V avatar Apr 03 '24 13:04 Laurence-V

@Laurence-V this is a valid bug. I'm moving it to our backlog and it'll be fixed as soon as possible

musale avatar May 14 '24 12:05 musale

Thanks @musale,
I've also noticed that in the MGT component, Less Than and Greater Than get converted into HTML And that HTML Tags get rendered correctly i.e. with <> but they also get auto completed in the MGT component Whereas in the (New) Teams client, they are rendered as entered.

Messages entered from Microsoft Graph Toolkit MGT_Component

Messages displayed in Teams Client TeamClient

Laurence-V avatar May 14 '24 13:05 Laurence-V

@Laurence-V the processing of the Teams messages in mgt-chat is done by parsing the html text so I would suggest that these edge cases are given an independent look. Could you make this another issue so that we can track other scenarios too?

musale avatar May 14 '24 14:05 musale