Fix CodeQL warnings

This commit is contained in:
DecDuck
2025-06-28 12:00:42 +10:00
parent 1bfdd73e4c
commit 12d87d6256
3 changed files with 8 additions and 5 deletions

View File

@@ -7,6 +7,9 @@ on:
pull_request: pull_request:
branches: branches:
- develop - develop
permissions:
contents: read
jobs: jobs:
typecheck: typecheck:

View File

@@ -8,6 +8,9 @@ on:
schedule: schedule:
- cron: "0 2 * * *" # run at 2 AM UTC - cron: "0 2 * * *" # run at 2 AM UTC
permissions:
contents: read
jobs: jobs:
web: web:
name: Push website Docker image to registry name: Push website Docker image to registry

View File

@@ -151,11 +151,8 @@ const toggleTag = (tag: string) => {
}; };
const formatExcerpt = (excerpt: string) => { const formatExcerpt = (excerpt: string) => {
// TODO: same as one in NewsArticleCreateButton // Convert markdown to HTML, micromark is safe
// Convert markdown to HTML return micromark(excerpt);
const html = micromark(excerpt);
// Strip HTML tags using regex
return html.replace(/<[^>]*>/g, "");
}; };
const filteredArticles = computed(() => { const filteredArticles = computed(() => {