Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25731

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

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 18.10.0-rc-1
    • 18.9.0
    • BlockNote
    • None
    • Unknown

    Description

      The URL link target of the BlockNote link modal only accepts full URLs: the browser rejects the URL field until the URL has a scheme (e.g. https://). So typing or pasting www.xwiki.org or xwiki.org/download doesn't work, and neither does a relative URL like /xwiki/bin/view/Main/.

      Proposed behavior:

      • A URL that starts with a host name (e.g. www.xwiki.org, xwiki.org/download, localhost:8080/xwiki) is completed with the https:// scheme. The URL field shows the completed URL once you leave it, so you see what will be inserted.
      • A relative URL (starting with /, ./, ../, ? or #) is kept as typed.
      • A URL without a scheme is saved as a typed URL resource reference (e.g. url:/xwiki/bin/view/Main/), so it's still a URL link when you edit it again. Untyped, it would be parsed back as a page reference.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: