Skip to content
Snippets Groups Projects
Commit 5befd3e4 authored by Eoghan Ó Carragáin's avatar Eoghan Ó Carragáin Committed by Demian Katz
Browse files

Make sure spaces in full text URLs are properly encoded

- Prevents problems when passing them to Tika/Aperture command-line utilities.
parent bf856047
No related merge requests found
......@@ -85,8 +85,8 @@ public String getFulltext(Record record, String fieldSpec, String extension) {
Iterator fieldsIter = fields.iterator();
if (fields != null) {
while(fieldsIter.hasNext()) {
// Get the current string to work on:
String current = fieldsIter.next();
// Get the current string to work on (and sanitize spaces):
String current = fieldsIter.next().replaceAll(" ", "%20");
// Filter by file extension
if (extension == null || current.endsWith(extension)) {
// Load the parser output for each tag into a string
......@@ -257,4 +257,4 @@ public String harvestWithParser(url, settings) {
return harvestWithTika(url, settings[1]);
}
return null;
}
\ No newline at end of file
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment