From 6d01dc24abf320e0a068d00511c79213797611fc Mon Sep 17 00:00:00 2001 From: Luigi Asprino Date: Mon, 16 Sep 2024 09:51:29 +0200 Subject: [PATCH] #503 --- .../sparqlanything/html/org/apache/any23/rdf/RDFUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparql-anything-html/src/main/java/io/github/sparqlanything/html/org/apache/any23/rdf/RDFUtils.java b/sparql-anything-html/src/main/java/io/github/sparqlanything/html/org/apache/any23/rdf/RDFUtils.java index 053cf13d..22269707 100644 --- a/sparql-anything-html/src/main/java/io/github/sparqlanything/html/org/apache/any23/rdf/RDFUtils.java +++ b/sparql-anything-html/src/main/java/io/github/sparqlanything/html/org/apache/any23/rdf/RDFUtils.java @@ -190,7 +190,7 @@ public static String fixIRIWithException(String unescapedIRI) { escapedIRI = escapedIRI.replaceAll(">.*$", ""); // Drop the triple if any of these appear in the URL: <>[]|*{}"<>\ - if (escapedIRI.matches("[<>\\[\\]|\\*\\{\\}\"\\\\]")) + if (escapedIRI.contains("<")||escapedIRI.contains(">")||escapedIRI.matches("[\\[\\]|\\*\\{\\}\"\\\\]")) throw new IllegalArgumentException("Invalid character in org.eclipse.rdf4j.model.IRI: " + unescapedIRI); return escapedIRI;