microsoft / microsoft/pxt

Docs: Social cards don't remove HTML

Open
#10,333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
641
Avg merge
12h 4m
Merged PRs (30d)
57

Description

In the docs, it looks like the twitter and OG social media metadata might keep any HTML tags used in the description. At least they are escaped, so maybe this is by design, but it might be worth removing the tag altogether.

For example in this page, the <strong> tags end up in the card:
https://makecode.microbit.org/online-learning

Image

And in the HTML we see:

<meta name="twitter:description" content="&lt;strong&gt;Microsoft Teams&lt;/strong&gt; is a collaboration hub for Office 365 where Educators can organize student groups into classes with content, conversations, apps, and assignments all in one place." />
<meta property="og:description" content="&lt;strong&gt;Microsoft Teams&lt;/strong&gt; is a collaboration hub for Office 365 where Educators can organize student groups into classes with content, conversations, apps, and assignments all in one place." />

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on the linked online-learning page and inspect how the Twitter and Open Graph description metadata is generated. Trace that metadata path to find where the HTML tags are retained. Done means the social-card descriptions contain the text without the escaped HTML tags, while preserving the description content.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.