Skip to content

Conversation

@Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Jul 22, 2025

☑️ Resolves

  • Fix rendering autolinks for cases:
    • protocol is missing - e.g. www.nextcloud.com is not resolved
    • markdown URL - e.g. [www.nextcloud.com](www.nextcloud.com) is resolved as relative link
      • having // is a requirement for an absolute link, can only prepend this and not full scheme

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 Tasks

  • adjust tests (for invalid links cases, and relative links cases)
  • align with other apps (Collectives) on usage of URL_PATTERN / URL_PATTERN_AUTOLINK
  • adjust both regexes to match links more correctly

🏁 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 July 22, 2025 10:18
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
[skip ci]

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the 9.0.0-rc.6 milestone Jul 22, 2025
@Antreesy Antreesy self-assigned this Jul 22, 2025
@Antreesy Antreesy added bug Something isn't working 2. developing Work in progress feature: richtext Related to the richtext component labels Jul 22, 2025
to: route,
}, { default: () => children })
} else if (!/^https?:\/\//.test(props.href)) {
props.href = 'https://' + props.href
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we allow other protocols? Then this would be invalid (e.g. tel: or mailto:)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal regex doesn't allow it, but flavored markdown does. Maybe we can test against any schema present

@susnux susnux removed this from the 9.0.0-rc.6 milestone Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress bug Something isn't working feature: richtext Related to the richtext component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants