microsoft / microsoft/BotFramework-WebChat
Rectify discrepancies between Markdown footnote-style link reference and `entities.citation.appearance.url`
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
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"
}
]
}
]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by tracing how chat history renders Markdown footnote-style links and citation appearance links, then reproduce the supplied chat history; done means both links use the Markdown reference URL, including when citation URLs differ or are absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100