From: Phil Cooper-king Date: 2010-01-08T07:03:04+09:00 Subject: Re: Stopping String Escaping. > How are you parsing them? > If you are using File.read() then no unescaping is done. I am using rails and redcloth, I have the plain-text in the database, and the text gets parsed when the view gets called atm. I am using Uv to for the syntax, which I pull out before sending to redcloth [code] def snatch_code(text) snippets = text.scan(/#>code\((\S+)\)(.+?)#>code/m) snippets.each do |snip| code = Uv.parse(snip[1], 'xhtml', snip[0], false, 'twilight') code.insert(0, "") code.insert(code.length, "") text.sub!(/#>code\((\S+)\)(.+?)#>code/m, code) end text end [/code] then redcloth parses it. > 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 ouch. and thanks > If you are parsing them some other way, then please explain it. Please > also explain what "shop escaping" is. dyslexia rules! KO! I want to stop the escaping that’s not dealing with whitespace, tab, new line etc. Phil. -- Posted via http://www.ruby-forum.com/.