Apr 12 2023 12:46 AM
The rendering of HTML entities on refresh of an adaptive card seems to be broke when a user mention is contained.
I have condensed the behaviour to the simplest use case:
There is a an adaptive card with a user mention and a ->
When I send this as a message to teams it is rendered properly:
This card contains a refresh attribute and the card is fetched again from the server for one specific user and is then rendered like this:
The arrow is displayed encoded and also the hover on the user mention is not working properly.
The code for the adaptive card is exactly the same in both renderings. Once it is send as an attachment as message and once directly in the value attribute of the refresh call:
{
"statusCode": 200,
"type": "application/vnd.microsoft.card.adaptive",
"value": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"text": "<at>userA</at> Arrow B -> C",
"type": "TextBlock"
}
],
"msteams": {
"width": "Full",
"entities": [
{
"type": "mention",
"text": "<at>userA</at>",
"mentioned": {
"id": "somevaliduserId",
"name": "userA"
}
}
]
},
"refresh": {
"action": {
"type": "Action.Execute",
"title": "Submit",
"verb": "refresh",
"data": {
"extradata": "5f9f1b0b-1b1f-4b1f-9f1b-0b1b1f4b1f9f"
}
},
"userIds": [
"anothervaliduserId"
]
}
}
}
Is there anything else that need to be set to get the rendering of the mention and text correct?
If not this is a pretty severe bug that makes refresh unusable for us.
BTW, mobile view of the adaptive cards after refresh is even worse.
Apr 12 2023 04:17 AM
Apr 18 2023 02:16 AM
Apr 18 2023 03:20 AM
Apr 18 2023 09:18 PM