BotFramework-WebChat
BotFramework-WebChat copied to clipboard
Rectify discrepancies between Markdown footnote-style link reference and `entities.citation.appearance.url`
Is it an issue related to Adaptive Cards?
No
Is this an accessibility issue?
No
What version of Web Chat are you using?
Development build
Which distribution are you using Web Chat from?
Unrelated
Which hosting environment does this issue primarily affect?
Web apps
Which browsers and platforms do the issue happened?
Others or unrelated
Which area does this issue affect?
Chat history
Which theme pack does this issue affect?
Fluent UI
What is the public URL for the website?
No response
Please describe the bug
For citations, if the link in Markdown (activity.text) and entities[@id=""].citation[].appearance.link differs, then depends on where the user click the link, it will open different site.
Markdown footnote-style link reference should be the source of truth.
Do you see any errors in console log?
How to reproduce the issue?
- Go to https://compulim.github.io/webchat-loader
- Paste the chat history
- Open the link via footnote-style link reference and citation
What do you expect?
Both link should go to https://bing.com/.
What actually happened?
When the citation link is clicked, it goes to https://google.com/.
Do you have any screenshots or recordings to repro the issue?
Adaptive Card JSON
Additional context
[
{
"from": { "role": "bot" },
"text": "Message[1] text[2]\n\n[1]: https://bing.com/ \"Citation1_Name\"\n[2]: \"Citation2_Name\"\n[3]: https://bing.com/ \"Citation3_Name\"",
"type": "message",
"entities": [
{
"type": "https://schema.org/Message",
"citation": [
{
"appearance": {
"abstract": "Citation1_Text",
"@type": "DigitalDocument",
"name": "Citation1_Name",
"url": "https://google.com/",
"image": { "@type": "ImageObject", "name": "Text" }
},
"position": 1,
"@type": "Claim",
"@id": "https://test.com/"
},
{
"appearance": {
"abstract": "Citation2_Text",
"@type": "DigitalDocument",
"name": "Citation2_Name",
"image": { "@type": "ImageObject", "name": "Text" }
},
"position": 2,
"@type": "Claim",
"@id": "cite:2"
},
{
"appearance": {
"abstract": "Citation3_Text",
"@type": "DigitalDocument",
"name": "Citation3_Name",
"url": "https://google.com/",
"image": { "@type": "ImageObject", "name": "Text", "url": "https://test1.com/" }
},
"position": 3,
"@type": "Claim",
"@id": "https://test.com/"
}
],
"@type": "Message",
"@id": "",
"additionalType": ["AIGeneratedContent"],
"@context": "https://schema.org"
},
{
"type": "https://schema.org/Claim",
"@id": "https://test.com/",
"@type": "Claim",
"@context": "https://schema.org",
"text": "Citation1_Text",
"name": "Citation1_Name"
},
{
"type": "https://schema.org/Claim",
"@id": "cite:2",
"@type": "Claim",
"@context": "https://schema.org",
"text": "Citation2_Text",
"name": "Citation2_Name"
},
{
"type": "https://schema.org/Claim",
"@id": "https://test.com/",
"@type": "Claim",
"@context": "https://schema.org",
"text": "Citation3_Text",
"name": "Citation3_Name"
}
]
}
]