[PR #2541] fix: allow JavaScript in archived pages to enable KaTeX/MathJax rendering #2152

Open
opened 2026-03-02 12:00:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2541
Author: @idiottrader
Created: 3/1/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • b6e75c7 fix: allow JavaScript in archived pages to enable KaTeX/MathJax rendering

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 apps/workers/workers/crawlerWorker.ts (+1 -1)

📄 Description

Fixes #1243

Problem

Mathematical expressions weren't rendering in reader view because the monolith archiving tool was stripping JavaScript from archived pages.

Root Cause

In crawlerWorker.ts, the monolith command was called with -Ije flags where -j means "No JavaScript". Since MathJax and KaTeX require JavaScript to render math expressions, the math was not being rendered.

Solution

Changed the monolith arguments from ["-", "-Ije", ...] to ["-", "-Ie", ...] - removing the -j flag while keeping -I (isolate) and -e (no embeds) for security.

Testing

This fix should be tested with: https://transformer-circuits.pub/2025/attribution-graphs/methods.html

/claim #1243


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2541 **Author:** [@idiottrader](https://github.com/idiottrader) **Created:** 3/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`b6e75c7`](https://github.com/karakeep-app/karakeep/commit/b6e75c7beb8189674e31e0883a97ad062702b688) fix: allow JavaScript in archived pages to enable KaTeX/MathJax rendering ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `apps/workers/workers/crawlerWorker.ts` (+1 -1) </details> ### 📄 Description Fixes #1243 ## Problem Mathematical expressions weren't rendering in reader view because the monolith archiving tool was stripping JavaScript from archived pages. ## Root Cause In crawlerWorker.ts, the monolith command was called with -Ije flags where -j means "No JavaScript". Since MathJax and KaTeX require JavaScript to render math expressions, the math was not being rendered. ## Solution Changed the monolith arguments from ["-", "-Ije", ...] to ["-", "-Ie", ...] - removing the -j flag while keeping -I (isolate) and -e (no embeds) for security. ## Testing This fix should be tested with: https://transformer-circuits.pub/2025/attribution-graphs/methods.html /claim #1243 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#2152
No description provided.