cal.com
cal.com copied to clipboard
fix: strip markdown from meta description tag in users page
What does this PR do?
remove markdown from description meta tags in user page and also closes #8745
Fixes
- Bug fix (non-breaking change which fixes an issue)
How should this be tested?
- add a markdown content to your bio
- go to your public profile page
- check the description html meta tag, markdown should be stripped
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
cal | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 15, 2023 7:23am |
ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 15, 2023 7:23am |
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Three Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load | % of Budget (350 KB ) |
---|---|---|---|
/apps/[slug]/[...pages] |
456.8 KB |
607.64 KB | 173.61% (🟡 +0.17%) |
/auth/setup |
174.79 KB |
325.63 KB | 93.04% (🟡 +0.16%) |
/event-types/[type] |
477.93 KB |
628.77 KB | 179.65% (🟡 +0.19%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-
Current Playwright Test Results Summary
✅ 112 Passing - ⚠️ 5 Flaky
Run may still be in progress, this comment will be updated as current testing workflow or job completes...
(Last updated on 05/15/2023 07:43:34am UTC)
Run Details
Running Workflow PR Update on Github Actions
Commit: 4007b37b312c5aefabe96ef38f2f6e0882850eb8
Started: 05/15/2023 07:29:08am UTC
⚠️ Flakes
📄 apps/web/playwright/managed-event-types.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Managed Event Types tests Can create managed event type
Retry 1 • Initial Attempt |
2.33% (7)7 / 301 runsfailed over last 7 days |
23.59% (71)71 / 301 runsflaked over last 7 days |
📄 apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Embed Code Generator Tests Event Type Edit Page open Embed Dialog for the Event Type
Retry 1 • Initial Attempt |
5.18% (16)16 / 309 runsfailed over last 7 days |
28.16% (87)87 / 309 runsflaked over last 7 days |
📄 apps/web/playwright/booking-seats.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking with Seats -- new-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1 • Initial Attempt |
0% (0)0 / 314 runsfailed over last 7 days |
67.20% (211)211 / 314 runsflaked over last 7 days |
Booking with Seats -- old-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1 • Initial Attempt |
0% (0)0 / 310 runsfailed over last 7 days |
19.68% (61)61 / 310 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.test.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
10.19% (16)16 / 157 runsfailed over last 7 days |
54.14% (85)85 / 157 runsflaked over last 7 days |
Hey @G3root,
Using remark for this seems like a very big dependency. Even though this runs on the server, it will still load this big dependency on the server and slow things down unnecessary. Are there any other options that could work as well without adding a big dependency? Perhaps https://github.com/stiang/remove-markdown will work already? Or maybe a simple regex would be sufficient since there's only a few markdown chars we can add?
On top of that I'd suggest adding this as a util to the lib package, similar to markdownToSafeHTML
, this way we can reuse the markdownToPlainText
utility easily and prevent other people from making their own solution.
Thanks 🫶
@JeroenReumkens pushed some changes
New dependency changes detected. Learn more about Socket for GitHub ↗︎
👍 No new dependency issues detected in pull request
Bot Commands
To ignore an alert, reply with a comment starting with @SocketSecurity ignore
followed by a space separated list of package-name@version
specifiers. e.g. @SocketSecurity ignore [email protected] bar@*
or ignore all packages with @SocketSecurity ignore-all
Pull request alert summary
Issue | Status |
---|---|
Install scripts | ✅ 0 issues |
Native code | ✅ 0 issues |
Bin script shell injection | ✅ 0 issues |
Unresolved require | ✅ 0 issues |
Invalid package.json | ✅ 0 issues |
HTTP dependency | ✅ 0 issues |
Git dependency | ✅ 0 issues |
Potential typo squat | ✅ 0 issues |
Known Malware | ✅ 0 issues |
Telemetry | ✅ 0 issues |
Protestware/Troll package | ✅ 0 issues |
📊 Modified Dependency Overview:
➕ Added Package | Capability Access | +/- Transitive Count |
Publisher |
---|---|---|---|
@types/[email protected] | None | +0 |
types |
[email protected] | None | +0 |
stiang |
🚮 Removed packages: [email protected], [email protected]
@JeroenReumkens pushed some changes replacing remark
Looks great to me @G3root Could you also please merge main in and add this to the new booker's meta when #8697 is auto-merged? After that I'm ready to approve 🙏
@JeroenReumkens new bookers meta won't need this right ?
@G3root My bad, you are totally right! I assumed the meta showed the event description (which can contain markdown) – but it only shows the title. So all good here. I'm gonna go ahead and merge this. Thanks a lot ❤️