On 2007-01-17, at 10:24, John Bachir wrote:
> Is there any somewhat standard way to remove or otherwise handle
> special or syntax characters from a user's search, such as a colon?
>
> I was thinking maybe there was something akin to
> Ferret::Analysis::FULL_ENGLISH_STOP_WORDS, like
> Ferret::Analysis::FERRET_SYNTAX_CHARS, but no such luck.
>
> How are other folks dealing with filtering user input?
Hey John,
i guess that would be a nice addition to have a const defined.. i'll do
it manually ..
if not defined?(FERRET_SPECIAL_CHARS)
FERRET_SPECIAL_CHARS = [ /:/, /\(/, /\)/, /\[/, /\]/, /!/, /\
+/, /"/, /~/, /\^/,
/-/, /|/, />/, /</, /=/, /\*/, /\?/, /
\./, /&/ ]
end
Ben
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk