mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Modified regex filter so it's in line with Solr 6 core name rules.
This commit is contained in:
parent
55ff4229f9
commit
d2cd213cd0
@ -86,15 +86,10 @@ final class Index {
|
|||||||
static private String sanitizeCoreName(String coreName) {
|
static private String sanitizeCoreName(String coreName) {
|
||||||
|
|
||||||
String result;
|
String result;
|
||||||
|
|
||||||
// Remove all non-ASCII characters
|
// Allow these characters: '-', '.', '0'-'9', 'A'-'Z', '_', and 'a'-'z'.
|
||||||
result = coreName.replaceAll("[^\\p{ASCII}]", "_"); //NON-NLS
|
// Replace all else with '_'.
|
||||||
|
result = coreName.replaceAll("[^-.0-9A-Z_a-z]", "_"); // NON-NLS
|
||||||
// Remove all control characters
|
|
||||||
result = result.replaceAll("[\\p{Cntrl}]", "_"); //NON-NLS
|
|
||||||
|
|
||||||
// Remove spaces / \ : ? ' "
|
|
||||||
result = result.replaceAll("[ /?:'\"\\\\]", "_"); //NON-NLS
|
|
||||||
|
|
||||||
// Make it all lowercase
|
// Make it all lowercase
|
||||||
result = result.toLowerCase();
|
result = result.toLowerCase();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user