EOQualifier bad pattern for qualifier
EOQualifier bad pattern for qualifier
- Subject: EOQualifier bad pattern for qualifier
- From: Lachlan Deck <email@hidden>
- Date: Thu, 3 Apr 2008 17:16:56 +1100
Hi there,
If I have:
searchString = '*' + input + '*';
new EOKeyValueQualifier( anAttribute,
EOQualifier.QualifierOperatorCaseInsensitiveLike, searchString );
And someone puts in some strange characters (e.g., "find[me"), I get
the following exception.
java.lang.IllegalArgumentException: Bad pattern *photogra[hy*for
qualifier
at
com
.webobjects
.foundation
._NSStringUtilities
._bracketedStringFromPatternAnalyzer(_NSStringUtilities.java:740)
at
com
.webobjects
.foundation
._NSStringUtilities.stringMatchesPattern(_NSStringUtilities.java:785)
at
com
.webobjects
.eocontrol
.EOKeyValueQualifier.evaluateWithObject(EOKeyValueQualifier.java:141)
at
com
.webobjects
.eocontrol.EOOrQualifier.evaluateWithObject(EOOrQualifier.java:103)
at
com
.webobjects
.eocontrol.EOAndQualifier.evaluateWithObject(EOAndQualifier.java:96)
at
com
.webobjects
.eocontrol.EOQualifier.filteredArrayWithQualifier(EOQualifier.java:635)
<...>
I thought EOF would escape things automatically, but perhaps there's a
bug there(?). How else might I escape the chars (WO5.3.3)?
Thanks.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden