Does anyone know how to fix "ArgumentError: invalid %-encoding" errors?

182 views
Skip to first unread message

desbest

unread,
Apr 12, 2013, 1:08:31 PM4/12/13
to ram...@googlegroups.com
I have a simple form POST like this.

def edit_post
    data = request.subset(:content, :post_id)
    shake = Post[data['post_id']]
    data.delete('post_id');
    shake.update(data); shake.save
end

And sometimes when posting the form, the data['content'] fails to work due to a bad encoding.

ArgumentError: invalid %-encoding 

Is there any way to fix this?

Michael Fellinger

unread,
Apr 12, 2013, 1:36:18 PM4/12/13
to ramaze
What version of rack is that?



--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ramaze+un...@googlegroups.com.
To post to this group, send email to ram...@googlegroups.com.
Visit this group at http://groups.google.com/group/ramaze?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Michael Fellinger

desbest

unread,
Apr 12, 2013, 1:49:38 PM4/12/13
to ram...@googlegroups.com
Rack 1.4.5
I've got a gif animation here, for anyone who wants to see the web browser display the error, and my code.

tynamite

unread,
Apr 12, 2013, 7:24:32 PM4/12/13
to ram...@googlegroups.com
It is the % percent symbol that causes the encoding error. Is there any way this can be properly escaped, as it's already encoded as UTF-8?


--
You received this message because you are subscribed to a topic in the Google Groups "Ramaze" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ramaze/jnnXTcIqfpA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ramaze+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages