microsoft-graph-toolkit
microsoft-graph-toolkit copied to clipboard
[BUG][mgt-chat] HTML tags visible after editing chat within MGT mgt-chat component
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:
- Go to a system running chats using MGT
- Click on a message you have sent to get the context menu and select Edit
- The message will become editable
- Error: The message now shows the HTML tags, while in Edit Mode
To see in Web/Fat client
- Make a change while in the MGT chat component, while in Edit Mode
- Accept change
- Go message to Web/Fat client
- 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:
In fat client (not edit mode):
In web client (not edit mode):
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 this is a valid bug. I'm moving it to our backlog and it'll be fixed as soon as possible
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
Messages displayed in Teams Client
@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?