Skip to content

fix: accept upper-case link schemes and trim widget icons - #3416

Draft
rubenvdlinde wants to merge 2 commits into
mainfrom
fix/noid/link-scheme-and-widget-icon
Draft

rubenvdlinde wants to merge 2 commits into
mainfrom
fix/noid/link-scheme-and-widget-icon

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Two small input fixes, split out of #3135 at review:

  • Link cells accept the scheme in any case. HTTPS://nextcloud.com is the same link as https://nextcloud.com, because RFC 3986 compares schemes without case. Until now it was refused.
  • Widget icons are trimmed by TextHelper::trim(), the same way titles and descriptions are. So " star " is the star icon, and an icon of only blanks (no-break and zero-width spaces included) counts as no icon. Until now " star " was refused.

These are two separate commits, so either can be dropped if you'd rather not have it.

How it was tested

TextLinkBusinessTest: an upper-case scheme is accepted. GridWidgetTypesTest: a data provider with spaces, no-break and zero-width spaces around an icon. Full unit suite (787 tests) and psalm green.

How it was tested on a live instance

On Nextcloud 34 with PostgreSQL. Link cells through the API and in the browser: HTTPS://nextcloud.com and Https://nextcloud.com/x are saved as typed and the cell opens the link in a new tab; on main both were refused. https:// still works, and javascript: and FTP:// are still refused. Widget icons through the page API: " star " and a no-break/zero-width padded star are stored as star, an icon of only no-break spaces is stored as no icon, and an unknown icon is still refused; on main the padded ones were refused.

🖼️ Screenshots

None, no visible change.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

HTTPS://example.com is the same link as https://example.com; schemes
compare without case, as RFC 3986 defines them.

Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
Blanks around an icon name, no-break and zero-width spaces included, are
dropped, so " star " is the star icon and an icon of blanks is none.

Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
@blizzz blizzz added bug Something isn't working 2. developing Work in progress labels Dec 1, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants