fix(NcRichText): do not render invalid relative markdown links#8397
fix(NcRichText): do not render invalid relative markdown links#8397
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8397 +/- ##
==========================================
- Coverage 54.50% 54.47% -0.04%
==========================================
Files 104 105 +1
Lines 3405 3411 +6
Branches 995 996 +1
==========================================
+ Hits 1856 1858 +2
- Misses 1309 1313 +4
Partials 240 240 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'd even consider forbidding such links. F relative link can even be a link to a completely different service if Nextcloud is hosted on a non-empty base URL. |
6b21c2b to
ad1d51c
Compare
See last commit for the change 👇🏽 |
ad1d51c to
03e8416
Compare
- add noExtDecoration prop for reusing the component Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- still works: external links, internal absolute links, and internal relative links, that do have a router match for current app - internal relative links without match (also ?query and #anchor) only render an inner text - allow tel: and mail: to reduce breaking changes Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
2b4160d to
a5ae090
Compare
|
/backport to stable8 |
☑️ Resolves
fix(NcRichText)!: render all non-resolved links as external
What would be rendered for component
<NcRichText :autolink="true" :useMarkdown="true" />:https://autolink.me-https://autolink.me[hello](/world)-hellowith href: '/world'[hello](https://nextcloud.com)-hellowith href: 'https://nextcloud.com'[hello](tel:+49123456789)-hellowith href: 'tel:+49123456789'[hello](mailto:+49123456789)-hellowith href: 'mailto:+49123456789'[hello](other:proto)-helloas plain text[hello](world)-helloas plain text[hello](?parameters=1)-helloas plain text[hello](#anchor)-helloas plain text🚧 Tasks
🏁 Checklist
stable8for maintained Vue 2 version or not applicable