acts_as_solr vs Illegal character CTRLCHAR code 31

Just found out that 37 is an illegal solr character…
x.gsub(“37″,”) solves the problem…

Patch

# acts_as_solr/instance_methods.rb:62
# remove illegal control character in text  cannot be added ("#{i}" does not work...)
["\032","\033","\034","\035","\036","\037"].each do |char|
  v = v.gsub(char,'')
end

2 thoughts on “acts_as_solr vs Illegal character CTRLCHAR code 31

  1. shouldn’t it be ssth like this ?

    [“\032″,”\033″,”\034″,”\035″,”\036″,”\037”].each do |char|
    v = v.gsub(char,”)
    end

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s