fix: 编辑/新建文章页 Font Awesome 改用本地 vendored 资源

easyMDE 会注入失效的 maxcdn.bootstrapcdn.com 样式链接导致工具栏图标加载失败。
按 SECURITY_TODO #9 无外部 CDN 政策,本地化 Font Awesome 4.7.0(css+fonts),
并在两处 EasyMDE 配置中禁用 autoDownloadFontAwesome。
This commit is contained in:
2026-08-28 16:26:06 +08:00
parent 9bdb2d8556
commit 6220de9c84
9 files changed
+2678

No files matched your search

File diff suppressed because one or more lines are too long.
Binary file not shown.
File diff suppressed because it is too large. Load diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -120,6 +120,7 @@
<script>
var easyMDE = new EasyMDE({
element: document.getElementById('articleContent'),
autoDownloadFontAwesome: false,
spellChecker: false,
autosave: { enabled: false },
placeholder: '{{index .Tr "article_content"}}',
+1
View File
@@ -20,6 +20,7 @@
<link rel="stylesheet" href="/static/vendor/cropper.min.css?v=1">
<script src="/static/vendor/cropper.min.js?v=1"></script>
<link rel="stylesheet" href="/static/vendor/easymde.min.css?v=1">
<link rel="stylesheet" href="/static/vendor/font-awesome/4.7.0/css/font-awesome.min.css?v=1">
<script src="/static/vendor/easymde.min.js?v=1"></script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
+1
View File
@@ -84,6 +84,7 @@ var myEasyMDE = null;
document.addEventListener('DOMContentLoaded', function() {
myEasyMDE = new EasyMDE({
element: document.getElementById('content'),
autoDownloadFontAwesome: false,
spellChecker: false,
status: false,
previewRender: function (plainText, preview) {