From: KOSAKI Motohiro Date: 2011-01-16T23:14:58+09:00 Subject: [ruby-core:34525] Re: [Ruby 1.9-Bug#3869] Logger#log does not handle or escape new-line characters. Hi, 2011/1/16 Hal Brodigan : > Issue #3869 has been updated by Hal Brodigan. > > NaHi-san, here is the developer warning message: > > � �**Note**: Logger does not escape or sanitize any messages passed to it. Developers should be aware of when potentially malicious data (user-input) is passed to Logger, and manually escape the untrusted data: > > � � � �logger.info("User-input: #{input.dump}") Yeah, nice. I hope to apply this documentation improvement asap. It would really help to avoid developer misuse. > --- > Additional example using the proposed Array convention to escape the untrusted data: > --- > � � � �logger.info ["User-input: %p", data] > > --- > 1.9 only example: > --- > � � � �logger.info ["User-input: %p{input}", input: data] I'm not sure nahi-san has accepted this new syntax or not. But at least, It looks ok to me. Again, Thank you Hal.