Skip to content
Snippets Groups Projects
Commit 826a370f authored by Nicolas.Rod's avatar Nicolas.Rod
Browse files

fix(OAIService): use Matcher.quoteReplacement() on metadataContent to avoid...

fix(OAIService): use Matcher.quoteReplacement() on metadataContent to avoid error when metadata contains a dollar sign
parent 5a704f00
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
......@@ -401,7 +402,7 @@ public class OAIService {
// Replace each metadata content by the original XML contents including namespaces
for (String metadataContent : metadataContents) {
xml = xml.replaceFirst(OAIConstants.METADATA_CONTENT_TAG, metadataContent);
xml = xml.replaceFirst(OAIConstants.METADATA_CONTENT_TAG, Matcher.quoteReplacement(metadataContent));
}
return xml;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment