question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[JavaScript] "[" and "\" character in TextBlock with markup link does not render properly

See original GitHub issue

Platform

  • JavaScript

Author or host

Host Name : Microsoft Search

Version of SDK

“adaptivecards”: “2.0.0-rc.0”

Details

Following card doesn’t get rendered properly :

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "TextBlock",
            "text": "[Sample Title::[f:\test\hello ](http://abc.com)"
        }
    ]
}

Including “[” and "" character in TextBlock with markup link does not render the text block properly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dclauxcommented, Aug 21, 2020

@atishayv as you can see in the AC Designer, your payload isn’t valid JSON: image

As @shalinijoshi19 wrote, you need to escape the \ characters:

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "TextBlock",
            "text": "[Sample Title::[f:\\test\\hello ](http://abc.com)"
        }
    ]
}
0reactions
shakungrover05commented, Oct 8, 2020

@dclaux My bad, I mis-interpreted escape in json as skip during ingestion in my head. For now, I will route it to MRT team in IDC and see if it can be fixed there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hyperlink href incorrectly quoted in innerHTML?
Using innerText will not encode the text, and get the literal text within the html (also will strip any kind of other content...
Read more >
Handbook Markdown Guide
There are a few different ways to display links with markdown markup, but to keep some standards, let's try to use the following...
Read more >
Creating an Editable Textarea That Supports Syntax- ...
A textarea seems to be the only way to edit the text without unwanted bugs — it just doesn't let Prism.js do its...
Read more >
Structural markup and right-to-left text in HTML
This article looks at ways of handling text direction for structural markup in HTML, ie. at the document level and for elements like ......
Read more >
Markdown Syntax | YouTrack Server Documentation
In YouTrack, you can format text using the Markdown markup syntax. You can format text in issue descriptions, supplemental text fields, comments, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found