Skip to content

Commit 3a583c4

Browse files
committed
src/main/java: more DOI normalization
Normalize %2f to /.
1 parent 28668f7 commit 3a583c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/github/ilri/cgspace/ctasks/NormalizeDOIs.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* TODO: allow operation on communities and collections (currently only works on items)
3030
*
3131
* @author Alan Orth for the International Livestock Research Institute
32-
* @version 7.6.1.2
32+
* @version 7.6.1.3
3333
* @since 7.6.1.1
3434
*/
3535
@Suspendable
@@ -88,6 +88,8 @@ private static String getNormalizedDOI(MetadataValue itemDOI) {
8888
newDOI = newDOI.replace("dx.doi.org", "doi.org");
8989
// Prefer doi.org to www.doi.org
9090
newDOI = newDOI.replace("www.doi.org", "doi.org");
91+
// Fix URL encoded slashes (%2f)
92+
newDOI = newDOI.replace("%2f", "/");
9193
// Replace values like doi: 10.11648/j.jps.20140201.14
9294
newDOI = newDOI.replaceAll("^doi: 10\\.", "https://doi.org/10.");
9395
// Replace values like 10.3390/foods12010115

0 commit comments

Comments
 (0)