Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-11415

Update URLCleanup to use URL APIs instead of Regexp

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • URL cleanup
    • None

      The use of regular expressions to parse URLs is error prone and does not handle various corner cases. All modern browsers now support the URL and URLSearchParams objects for parsing/manipulating URLs and query parameters. It would be sensible to replace the use of regular expressions with these APIs in the URL Cleanup code.

      This change would require some changes in frontend URL rendering, as the URL APIs perform strict percent encoding/decoding and validation, e.g.

      The above means that there are various URLs in the database that may need reformatting.

      Related tickets:

            Unassigned Unassigned
            atj atj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Version Package