gitforge/templates
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
..
admin feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991) 2026-06-08 17:35:15 +02:00
api/packages/pypi
base fix: adds missing AppSubUrl to the webmanifest's location (#12702) 2026-05-23 16:33:32 +02:00
custom feat(ui): provide ability to add a warning message to the registration/login screens (#12597) 2026-05-21 06:04:41 +02:00
demo chore: dialog modal max-width rendering failure (#12469) 2026-05-08 08:01:34 +02:00
explore fix(ui): use octicon-repo-forked in repo list (#10227) 2025-11-26 11:21:20 +01:00
htmx fix(ui): Make 'Clear milestone' work with HTMX (#8266) 2025-08-11 20:10:10 +02:00
mail i18n(mailer): Fix special usage of .Locale in admin_new_user (#12009) 2026-04-14 07:20:16 +02:00
moderation feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
org feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991) 2026-06-08 17:35:15 +02:00
package feat: migrate show-modal to native dialogs (#10287) 2026-05-03 06:42:14 +02:00
projects fix: hide some disallowed actions that lead to 404 errors in archived repos (#12773) 2026-05-30 14:02:33 +02:00
repo feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991) 2026-06-08 17:35:15 +02:00
shared feat(ui): commit view redesign for pull request page (#7948) 2026-06-02 20:12:32 +02:00
status fix(ui): remove extra helpers from statuspages (#9753) 2025-10-20 12:03:58 +02:00
swagger feat: adds option to force overwrite new branch for /contents route (#12663) 2026-06-06 16:45:57 +02:00
user feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991) 2026-06-08 17:35:15 +02:00
webhook chore: rename SafeHTML to TrustHTML (#11481) 2026-03-08 02:41:37 +01:00
home.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
home_forgejo.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
install.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
post-install.tmpl