From: Brian Candler Date: 2010-01-08T06:23:50+09:00 Subject: Re: Stopping String Escaping. Phil Cooper-king wrote: > Hi, > > I'm trying to parse code snippets on a website that are submitted by the > user. the problem is that when a user tries to shop escaping in there > code the escaping actually happens. > > for instance if you submit \\ ruby teats it as a single \ is there > anyway to stop this? I still require all the other \'s such as \n etc. How are you parsing them? If you are using File.read() then no unescaping is done. If you are parsing them using eval(), then you are inviting your machine to be 0wned. See http://www.ruby-doc.org/docs/ProgrammingRuby/html/taint.html If you are parsing them some other way, then please explain it. Please also explain what "shop escaping" is. Regards, Brian. -- Posted via http://www.ruby-forum.com/.