Skip to content

fix(NcRichText): render invalid relative markdown links as external#8397

Open
Antreesy wants to merge 3 commits intomainfrom
fix/noid/external-links
Open

fix(NcRichText): render invalid relative markdown links as external#8397
Antreesy wants to merge 3 commits intomainfrom
fix/noid/external-links

Conversation

@Antreesy
Copy link
Copy Markdown
Contributor

@Antreesy Antreesy commented Apr 7, 2026

☑️ Resolves

fix(autolink): fix rendering of nested markdown link with

  • with autolink + useMarkdown props [href2](href1) syntax is rendered as <a href1><a href2>href2</a></a> instead of href2 being a plain text
🏚️ Before 🏡 After
image image

fix(NcRichText)!: render all non-resolved links as external

  • this covers:
    • external links (as before)
    • internal absolute links, but from another app (as before)
    • and internal relative links, that do not have a router match for current app (new)
      • possibly a breaking change?
      • this is likely an invalid user input, it shouldn't unload the page and destroy an app

🚧 Tasks

  • Consult other teams for using of relative links, whether it's breaking for them

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

Antreesy added 3 commits April 7, 2026 13:39
 - with autolink + useMarkdown props [href2](href1) syntax is rendered as <a href1><a href2>href2</a></a> instead of href2 being a plain text

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- add noExtDecoration prop for reusing the component

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- this covers external links, internal absolute links, and internal relative links, that do not have a router match for current app
- possibly a breaking change

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the 9.6.0 milestone Apr 7, 2026
@Antreesy Antreesy requested a review from ShGKme April 7, 2026 11:46
@Antreesy Antreesy self-assigned this Apr 7, 2026
@Antreesy Antreesy added 3. to review Waiting for reviews feature: richtext Related to the richtext component labels Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.08%. Comparing base (08100af) to head (6b21c2b).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
src/components/NcRichText/autolink.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8397      +/-   ##
==========================================
- Coverage   54.09%   54.08%   -0.01%     
==========================================
  Files         104      105       +1     
  Lines        3398     3400       +2     
  Branches      989      990       +1     
==========================================
+ Hits         1838     1839       +1     
- Misses       1321     1322       +1     
  Partials      239      239              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Antreesy Antreesy modified the milestones: 9.6.0, 9.7.0 Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: richtext Related to the richtext component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant