Skip to content

Remove URL parameters for DOI parsing

If we parse a DOI from a URL containing URL parameters the parameters are part of the URL instead.

E.g. parsing a DOI from http://www.example.com/DOI?urlParam1=foo&urlParam2=bar will result in the doi DOI?urlParam1=foo&urlParam2=bar. Technically this is a valid DOI but does not make sense.

Unfortunately we cannot be sure if the DOI is part of the URL or part of the parameters (could be http://www.example.com/?doi=DOI)

Proposed solution: Split URL into path and parameters and then check each part seperately for a DOI.

Edited by Gabriel Preuß