Skip to content

✨ Feature: Auto-Link URLs in Comments (Closes #122)#335

Open
Venuu07 wants to merge 1 commit into
QuoteVote:mainfrom
Venuu07:feature/auto-link-comments
Open

✨ Feature: Auto-Link URLs in Comments (Closes #122)#335
Venuu07 wants to merge 1 commit into
QuoteVote:mainfrom
Venuu07:feature/auto-link-comments

Conversation

@Venuu07
Copy link
Copy Markdown

@Venuu07 Venuu07 commented May 11, 2026

Description

Hi @flyblackbox! As discussed in the issue thread, this PR implements the auto-linking feature specifically within the Comments section.

Changes Made

  • Reusable Architecture: Created a highly reusable <LinkifiedText /> component to handle URL parsing and rendering without cluttering the View files.
  • Security: Utilized linkify-it for URL detection (restricted to http:/https:) and dompurify to strictly sanitize URLs against XSS vulnerabilities.
  • UI/UX: Replaced standard text rendering in Comment.jsx. Links are rendered using Material-UI's <Link> with target="_blank", rel="noopener noreferrer", and visual truncation for links over 50 characters to prevent layout breakage.
  • Performance: Wrapped the parsing logic in useMemo to prevent unnecessary re-renders.

Let me know if you need any adjustments or if this looks good to go!

@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for quotevote ready!

Name Link
🔨 Latest commit 63ec3f7
🔍 Latest deploy log https://app.netlify.com/projects/quotevote/deploys/6a01b123e46ad900083d1586
😎 Deploy Preview https://deploy-preview-335--quotevote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant