diff --git a/client/src/components/Collab/CollabNotes.tsx b/client/src/components/Collab/CollabNotes.tsx index c46477bd7..0c72e3978 100644 --- a/client/src/components/Collab/CollabNotes.tsx +++ b/client/src/components/Collab/CollabNotes.tsx @@ -2,6 +2,8 @@ import { useState, useEffect, useCallback, useMemo } from 'react' import Markdown from 'react-markdown' import remarkGfm from 'remark-gfm' import remarkBreaks from 'remark-breaks' +import rehypeSanitize from 'rehype-sanitize' +import { markdownLinkComponents } from '../shared/markdownLink' import { createPortal } from 'react-dom' import { Plus, Pencil, X, StickyNote, Settings } from 'lucide-react' import { collabApi } from '../../api/client' @@ -445,7 +447,7 @@ function ViewNoteModal(S: NotesState) {
- {viewingNote.content || ''} + {viewingNote.content || ''} {(viewingNote.attachments || []).length > 0 && (
{t('files.title')}
diff --git a/client/src/components/Collab/CollabNotesCard.tsx b/client/src/components/Collab/CollabNotesCard.tsx index 7eaa2ff11..1bfe466ff 100644 --- a/client/src/components/Collab/CollabNotesCard.tsx +++ b/client/src/components/Collab/CollabNotesCard.tsx @@ -3,6 +3,8 @@ import { avatarSrc } from '../../utils/avatarSrc' import Markdown from 'react-markdown' import remarkGfm from 'remark-gfm' import remarkBreaks from 'remark-breaks' +import rehypeSanitize from 'rehype-sanitize' +import { markdownLinkComponents } from '../shared/markdownLink' import { Trash2, Pin, PinOff, Pencil, Maximize2 } from 'lucide-react' import { FONT } from './CollabNotes.constants' import { AuthedImg } from './CollabNotesAuthedImg' @@ -142,7 +144,7 @@ export function NoteCard({ note, currentUser, canEdit, onUpdate, onDelete, onEdi maxHeight: '4.5em', overflow: 'hidden', wordBreak: 'break-word', fontFamily: FONT, }}> - {note.content} + {note.content}
)}
diff --git a/client/src/mobile/screens/trip/tabs/MCollabNotes.tsx b/client/src/mobile/screens/trip/tabs/MCollabNotes.tsx index 6288cda79..647b56f14 100644 --- a/client/src/mobile/screens/trip/tabs/MCollabNotes.tsx +++ b/client/src/mobile/screens/trip/tabs/MCollabNotes.tsx @@ -2,6 +2,8 @@ import { useCallback, useEffect, useRef, useState } from 'react' import Markdown from 'react-markdown' import remarkGfm from 'remark-gfm' import remarkBreaks from 'remark-breaks' +import rehypeSanitize from 'rehype-sanitize' +import { markdownLinkComponents } from '../../../../components/shared/markdownLink' import { Check, FileText, Paperclip, Pin, PinOff, Plus, StickyNote, Trash2, X } from 'lucide-react' import MDancingTrek from '../../../components/MDancingTrek' import { collabApi } from '../../../../api/client' @@ -336,7 +338,7 @@ function NoteCardRow({ note, color, canEdit, onTap, onTogglePin, onDelete, t }: