Permalink
Browse files

Merge branch 'develop' of github.com:structr/structr into develop

  • Loading branch information...
2 parents e9d6435 + 83048a3 commit 3a73373931fcc34922f05dd48cae9da6bbc5b011 @amorgner amorgner committed May 18, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 structr/structr-rest/src/main/java/org/structr/rest/resource/Resource.java
@@ -385,6 +385,15 @@ protected boolean hasSearchableAttributes(final String rawType, final HttpServle
if (looseSearch) {
+ // no quotes allowed in loose search queries!
+ if(searchValue.contains("\"")) {
+ searchValue = searchValue.replaceAll("[\"]+", "");
+ }
+
+ if(searchValue.contains("'")) {
+ searchValue = searchValue.replaceAll("[']+", "");
+ }
+
searchAttributes.add(Search.andProperty(key, searchValue));
} else {
@@ -417,4 +426,11 @@ public boolean isPrimitiveArray() {
public void setSecurityContext(SecurityContext securityContext) {
this.securityContext = securityContext;
}
+
+ public static void main(String[] args) {
+
+ String test = "\"\"\"us De Lameng\"\" e.V.\"";
+
+ System.out.println(test.replaceAll("[\"]+", "\""));
+ }
}

0 comments on commit 3a73373

Please sign in to comment.