python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / django-mdeditor / Bump-KaTeX-and-replace-bootcdn-with-jsdelivr.patch
blob28f7b182809f2995428f9f615bbdc94d302012b9
1 From c5af641cccf663dffb4a47d32e28404f609badce Mon Sep 17 00:00:00 2001
2 From: Tomo <tomodachi94@protonmail.com>
3 Date: Sat, 12 Oct 2024 03:39:12 +0000
4 Subject: [PATCH 1/2] chore(KaTeX): bump to 0.7.1
6 Many bugfixes. This KaTeX is still quite old,
7 but versions beyond this have backwards-incompatibilities
8 (starting in 0.8).
9 ---
10 mdeditor/static/mdeditor/js/editormd.js | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
13 diff --git a/mdeditor/static/mdeditor/js/editormd.js b/mdeditor/static/mdeditor/js/editormd.js
14 index be0005d..8aacb56 100644
15 --- a/mdeditor/static/mdeditor/js/editormd.js
16 +++ b/mdeditor/static/mdeditor/js/editormd.js
17 @@ -4179,8 +4179,8 @@
18 // 使用国外的CDN,加载速度有时会很慢,或者自定义URL
19 // You can custom KaTeX load url.
20 editormd.katexURL = {
21 - css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.3.0/katex.min",
22 - js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.3.0/katex.min"
23 + css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min",
24 + js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min"
27 editormd.kaTeXLoaded = false;
28 --
29 2.46.2
32 From 3d082a738262b057d33b9aa8c777d50113143952 Mon Sep 17 00:00:00 2001
33 From: Tomo <tomodachi94@protonmail.com>
34 Date: Mon, 7 Oct 2024 17:44:39 -0700
35 Subject: [PATCH 2/2] fix(KaTeX): Use jsdelivr instead of bootcdn
37 Bootcdn was compromised by a malicious actor:
38 https://sansec.io/research/polyfill-supply-chain-attack
40 KaTeX recommends using jsdelivr, so I used that:
41 https://katex.org/docs/browser
42 ---
43 mdeditor/static/mdeditor/js/editormd.js | 4 ++--
44 1 file changed, 2 insertions(+), 2 deletions(-)
46 diff --git a/mdeditor/static/mdeditor/js/editormd.js b/mdeditor/static/mdeditor/js/editormd.js
47 index 8aacb56..a31e817 100644
48 --- a/mdeditor/static/mdeditor/js/editormd.js
49 +++ b/mdeditor/static/mdeditor/js/editormd.js
50 @@ -4179,8 +4179,8 @@
51 // 使用国外的CDN,加载速度有时会很慢,或者自定义URL
52 // You can custom KaTeX load url.
53 editormd.katexURL = {
54 - css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min",
55 - js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min"
56 + css : "//cdn.jsdelivr.net/npm/katex@0.7.1/dist/katex.min.css",
57 + js : "//cdn.jsdelivr.net/npm/katex@0.7.1/dist/katex.min.js"
60 editormd.kaTeXLoaded = false;
61 --
62 2.46.2