There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0f953a27-7114-4897-997b-d73a4d932a5c XWIKI-25731 Closed

Accept URLs without a scheme in the URL link target of the BlockNote link modal

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-152d5722-355e-410e-88bd-c9e064c5da11 Changes by Marius Dumitru Florea on 12/Nov/26 08:18
 
Resolution: Fixed
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-152d5722-355e-410e-88bd-c9e064c5da11 Marius Dumitru Florea on 12/Nov/26 08:18
 

Implemented in 6532efe0304 (not pushed yet). The URL link target of the BlockNote link modal now accepts:

  • a URL starting with a host name, e.g. www.xwiki.org, example.org/docs, localhost:8080/xwiki or 192.168.0.1: it's completed with the https:// scheme, as the address bar of a browser does, as soon as the user leaves the URL field (so the user sees the URL that is saved) and when the link is saved.
  • a relative URL, e.g. /xwiki/bin/view/Main/: it's kept as typed and saved as a typed path reference (path:/xwiki/bin/view/Main/). It can't be saved as a URL reference because XWiki Rendering accepts a URL reference only with a scheme (scheme://) and parses anything else back as a document reference, even when typed (url:/xwiki/bin/view/Main/ is a link to a page with that name). Editing such a link shows it as a Path link.

The URLs with a scheme (https://..., mail_small.gif..., tel:...) are left untouched. The URL field no longer uses the url input type, whose browser validation rejected the URLs without a scheme, but it keeps the URL virtual keyboard on mobile devices.