Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(math-renderer): sanitize html from katex #4379

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

LarsTheGlidingSquirrel
Copy link
Member

No description provided.

Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Dec 23, 2024 11:23am

@LarsTheGlidingSquirrel LarsTheGlidingSquirrel marked this pull request as ready for review December 23, 2024 11:20
Copy link
Contributor

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 104.89 KB (🟡 +16 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Twenty-seven Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/[...slug] 94.91 KB (🟡 +184 B) 199.8 KB
/___bot_or_not 106.37 KB (🟡 +183 B) 211.26 KB
/___editor_preview 663.81 KB (🟡 +210 B) 768.7 KB
/___old_comments 99.51 KB (🟡 +4 B) 204.4 KB
/biologie 163.59 KB (🟡 +184 B) 268.49 KB
/chemie 163.59 KB (🟡 +182 B) 268.48 KB
/content-only/[...slug] 87.01 KB (🟡 +182 B) 191.9 KB
/discussions 96.05 KB (🟡 +4 B) 200.94 KB
/editor 87.82 KB (🟡 +183 B) 192.71 KB
/entity/create/[type]/[taxonomyId] 684.09 KB (🟡 +208 B) 788.99 KB
/entity/repository/add-revision/[...id] 683.83 KB (🟡 +208 B) 788.72 KB
/entity/repository/compare/[entity_id]/[revision_id] 99.57 KB (🟡 +184 B) 204.46 KB
/event/history 123.32 KB (🟡 +4 B) 228.22 KB
/event/history/[...slug] 124.3 KB (🟡 +4 B) 229.19 KB
/event/history/user/profile/[username] 126.69 KB (🟡 +4 B) 231.58 KB
/gleichungs-app 164.3 KB (🟡 +3 B) 269.19 KB
/informatik 163.59 KB (🟡 +184 B) 268.49 KB
/lerntipps 163.59 KB (🟡 +183 B) 268.48 KB
/license/detail/[id] 74.87 KB (🟡 +182 B) 179.76 KB
/mathe 163.59 KB (🟡 +182 B) 268.48 KB
/nachhaltigkeit 163.6 KB (🟡 +184 B) 268.49 KB
/page/create 683.81 KB (🟡 +208 B) 788.7 KB
/taxonomy/term/create/[parent_id]/[id] 683.56 KB (🟡 +208 B) 788.45 KB
/taxonomy/term/update/[id] 683.51 KB (🟡 +209 B) 788.4 KB
/user/notifications 125.66 KB (🟡 +4 B) 230.55 KB
/user/profile/[username] 182.66 KB (🟡 +187 B) 287.55 KB
/user/settings 685.48 KB (🟡 +210 B) 790.37 KB
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

Next to the size is how much the size has increased or decreased compared with the base branch of this 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.

Copy link
Member

@elbotho elbotho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This article is probably a good place to test :)
https://frontend-git-math-renderer-sanitize-html-serlo.vercel.app/90410

@LarsTheGlidingSquirrel LarsTheGlidingSquirrel merged commit e66cba9 into staging Dec 23, 2024
9 checks passed
@LarsTheGlidingSquirrel LarsTheGlidingSquirrel deleted the math-renderer-sanitize-html branch December 23, 2024 11:29
@github-actions github-actions bot mentioned this pull request Dec 23, 2024
@LarsTheGlidingSquirrel
Copy link
Member Author

This article is probably a good place to test :)
https://frontend-git-math-renderer-sanitize-html-serlo.vercel.app/90410

That's super useful! Seems to work everywhere. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants