diff options
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/src/components/HomeView.svelte | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/src/components/HomeView.svelte b/ui/src/components/HomeView.svelte index 2794712..732545f 100644 --- a/ui/src/components/HomeView.svelte +++ b/ui/src/components/HomeView.svelte @@ -22,10 +22,22 @@ }); } + function escapeHtml(unsafe: string) { + return unsafe + .replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); + } + // Enhanced markdown parser with Emoji and GitHub specific features function formatBody(body: string) { if (!body) return ''; + // Escape HTML first to prevent XSS + let processed = escapeHtml(body); + // Emoji map (common GitHub emojis) const emojiMap: Record<string, string> = { ':tada:': '🎉', ':sparkles:': '✨', ':bug:': '🐛', ':memo:': '📝', @@ -89,7 +101,7 @@ </div> <!-- Scrollable Container --> -<div class="relative z-10 h-full {releasesState.isLoading || releasesState.releases.length === 0 ? 'overflow-hidden' : 'overflow-y-auto custom-scrollbar scroll-smooth'}"> +<div class="relative z-10 h-full {releasesState.isLoading ? 'overflow-hidden' : 'overflow-y-auto custom-scrollbar scroll-smooth'}"> <!-- Hero Section (Full Height) --> <div class="min-h-full flex flex-col justify-end p-12 pb-32"> |