Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-294

Automatically select identifier type when pasting URL or identifier

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • Site Interface
    • None

      The identifier modal should make an educated guess when pasting URLs.

      This should be achievable with the use of more elaborate regular expressions.

      If pasted a URL, it should be pretty straightforward to extract the identifier

      1. Example: https://www.wikidata.org/wiki/Q150827
      2. Current regexp:
        ^Q\d+$
        
      1. Proposed regexp:
        ^(?:(?:(https?):\/\/)?(?:www\.)?wikidata\.org\/wiki\/)?Q\d+$
        
      1. This will match http://www.… and https://www… and also wikidata.org/… and also the identifier by itself

            mr_monkey Monkey
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package