gitforge/templates/admin
AverageHelper 408572dd35 feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991)
This PR pertains to the client-side validation of the Website input on user, repo, and org profiles. #12962 extends `[service].VALID_SITE_URL_SCHEMES` to cover Website fields on repo and org profiles, where before that config key only applied to the one on user profiles. If that change merges, it will then be possible to construct an HTML [`pattern`](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/input#pattern) attribute for general use on any Website form input that the server validates this way, thus enabling browsers to catch errors early relating to URL scheme confusion.

This PR (1) introduces such a `pattern` attribute, and (2) adds a new UI note to make clear to users which URL schemes are permitted. This change helps explain the browser's otherwise cryptic error messages regarding pattern mismatch, while also letting users know what URI schemes the Forgejo instance supports as Website links (e.g. gemini:// URLs).

![A text field labeled "Website", with a note below which reads, "Allowed URL schemes include: http, https"](/attachments/304e17ee-b5aa-414e-a4fa-d48639336c6c)

This MUST NOT merge before #12962. To do so would introduce a regression wherein the UI may suggest and validate a different set of allowed URL schemes than the server actually permits.

See also #5519

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12991
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-08 17:35:15 +02:00
..
applications
auth feat: add dynamic group mappings for OIDC (#11656) 2026-05-22 12:38:20 +02:00
emails feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
federation feat: add admin views for federation configuration, hosts and users (#11115) 2026-04-09 19:38:33 +02:00
moderation fix: 'More actions' (⋯) dropdown from moderation reports overview page (#10339) 2025-12-10 17:09:59 +01:00
org fix(i18n): fix several usages of i18n (#7422) 2025-04-02 14:50:02 +00:00
packages chore: rename SafeHTML to TrustHTML (#11481) 2026-03-08 02:41:37 +01:00
repo feat: migrate show-modal to native dialogs (#10287) 2026-05-03 06:42:14 +02:00
runners feat: add form-based runner management (#11516) 2026-03-12 02:14:45 +01:00
user feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991) 2026-06-08 17:35:15 +02:00
actions.tmpl
config.tmpl chore(i18n): May 2026 maintenence (#12718) 2026-05-25 10:59:49 +02:00
config_settings.tmpl
cron.tmpl feat(ui): improve admin dashboard cron list (#10270) 2025-12-01 15:19:36 +01:00
dashboard.tmpl feat(ui): improve admin dashboard cron list (#10270) 2025-12-01 15:19:36 +01:00
hook_new.tmpl
hooks.tmpl
layout_footer.tmpl
layout_head.tmpl
navbar.tmpl feat: add admin views for federation configuration, hosts and users (#11115) 2026-04-09 19:38:33 +02:00
notice.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
queue.tmpl
queue_manage.tmpl chore(i18n): move 89 strings to JSON (#12280) 2026-04-27 16:07:51 +02:00
self_check.tmpl
stacktrace-row.tmpl feat: require data-modal-id for delete buttons (#8711) 2025-08-08 01:53:23 +02:00
stacktrace.tmpl chore: rename SafeHTML to TrustHTML (#11481) 2026-03-08 02:41:37 +01:00
stats.tmpl
system_status.tmpl chore(i18n): move 89 strings to JSON (#12280) 2026-04-27 16:07:51 +02:00