fix: strip HTML tags from event description in note tooltip

Calendar providers return descriptions with HTML tags (e.g. <p>test</p>).
Strip them before displaying in the hover tooltip.

v1.67.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin 2026-03-24 12:26:58 +01:00
parent 1e789d93ae
commit 343cc87e4d
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "my-weekly-todo-list", "name": "my-weekly-todo-list",
"version": "1.67.0", "version": "1.67.1",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -83,6 +83,8 @@ import {
FileText, FileText,
} from "lucide-react"; } from "lucide-react";
const stripHtml = (html: string) => html.replace(/<[^>]*>/g, '').trim();
// Types // Types
import UserMenu from "./UserMenu"; import UserMenu from "./UserMenu";
import SearchModal from "./SearchModal"; import SearchModal from "./SearchModal";
@ -7799,7 +7801,7 @@ export default function WeeklyView() {
{(event.isRecurring || event.description || profile.showCalendarProviderIcon) && ( {(event.isRecurring || event.description || profile.showCalendarProviderIcon) && (
<div className="event-icons-row"> <div className="event-icons-row">
{event.description && ( {event.description && (
<span className="event-note-icon" data-note={event.description}> <span className="event-note-icon" data-note={stripHtml(event.description || '')}>
<FileText size={11} /> <FileText size={11} />
</span> </span>
)} )}
@ -7940,7 +7942,7 @@ export default function WeeklyView() {
{(event.isRecurring || event.description || profile.showCalendarProviderIcon) && ( {(event.isRecurring || event.description || profile.showCalendarProviderIcon) && (
<div className="event-icons-row"> <div className="event-icons-row">
{event.description && ( {event.description && (
<span className="event-note-icon" data-note={event.description}> <span className="event-note-icon" data-note={stripHtml(event.description || '')}>
<FileText size={11} /> <FileText size={11} />
</span> </span>
)} )}