microsoft / AdaptiveCards

A new way for developers to exchange card content in a common and consistent way.
https://adaptivecards.io
MIT License
1.75k stars 550 forks source link

[Rendering] Hyperlink markdown renders as plain text in Input.Toggle #7467

Closed someonelikeTIM closed 2 years ago

someonelikeTIM commented 2 years ago

Target Platforms

NodeJS

SDK Version

Teams Toolkit 3.8.0

Application Name

Microsoft Teams

Problem Description

Markdown for hyperlink [title](url) is displaying as plain text. It was displaying properly just a few weeks ago. I recently returned from holiday to find it no longer working in my Teams message extension app.

It also displays properly when previewed at https://adaptivecards.io/designer but not in the actual Teams client. The card is delivered via bot as a task module. Adaptive Card version 1.3.

Screenshots

image

Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
      {
        "type": "Image",
        "url": "https://azcasappsvcblobstorage.blob.core.windows.net/customers/7583/OSU.jpg"
      },
      {
        "type": "TextBlock",
        "text": msgText,
        "wrap": true
      },
      {
        "type": "TextBlock",
        "text": "Include a message (optional):",
        "wrap": true,
        "weight": "Bolder"
      },
      {
        "type": "Input.Text",
        "placeholder": "Bravo!",
        "id": "message",
        "isMultiline": true
      },
      {
        "type": "Input.Toggle",
        "title": "Copy manager",
        "valueOn": "True",
        "valueOff": "False",
        "value": "False",
        "id": "IncludeManagers"
      },
      {
        "type": "Input.Toggle",
        "title": "I understand this message will be posted publicly to the [Rec Room](https://www.peopleareeverything.com/Dashboard/RecRoom)",
        "id": "agree",
        "isRequired": true,
        "errorMessage": "You must check the box to agree and continue.",
        "wrap": true,
        "separator": true,
        "spacing": "Large"
      },
      {
        "type": "ActionSet",
        "actions": [
          {
            "type": "Action.Submit",
            "title": "Submit",
            "data": { "action": "submit" }
          }
        ]
      }
    ]
  }

Sample Code Language

javascript

Sample Code

function msgCard(msgText) { // Adaptive Card for Message context.
  adaptiveCard = CardFactory.adaptiveCard({
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
      {
        "type": "Image",
        "url": "https://azcasappsvcblobstorage.blob.core.windows.net/customers/7583/OSU.jpg"
      },
      {
        "type": "TextBlock",
        "text": msgText,
        "wrap": true
      },
      {
        "type": "TextBlock",
        "text": "Include a message (optional):",
        "wrap": true,
        "weight": "Bolder"
      },
      {
        "type": "Input.Text",
        "placeholder": "Bravo!",
        "id": "message",
        "isMultiline": true
      },
      {
        "type": "Input.Toggle",
        "title": "Copy manager",
        "valueOn": "True",
        "valueOff": "False",
        "value": "False",
        "id": "IncludeManagers"
      },
      {
        "type": "Input.Toggle",
        "title": "I understand this message will be posted publicly to the [Rec Room](https://www.peopleareeverything.com/Dashboard/RecRoom)",
        "id": "agree",
        "isRequired": true,
        "errorMessage": "You must check the box to agree and continue.",
        "wrap": true,
        "separator": true,
        "spacing": "Large"
      },
      {
        "type": "ActionSet",
        "actions": [
          {
            "type": "Action.Submit",
            "title": "Submit",
            "data": { "action": "submit" }
          }
        ]
      }
    ]
  });

  return adaptiveCard
licanhua commented 2 years ago

@paulcam206 How to assign it to teams team? Likely they didn't use markdown-it

Wajeed-msft commented 2 years ago

This issue has been copied over to Microsoft Teams repo here: https://github.com/MicrosoftDocs/msteams-docs/issues/6173