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:
branches:
- develop
permissions:
contents: read
jobs:
typecheck:

View File

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

View File

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