diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.crypt.stringToUtf8ByteArray changes line-endings in strings! #627

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

goog.crypt.stringToUtf8ByteArray('A\r\n')
Expected: [65,13,10]
Actual: [65, 10]

For some reason, the code contains "str = str.replace(/\r\n/g, '\n');" which 
seems highly suspicious for a generic function like this.  Why would this 
method do line ending normalization?  That makes it useless to me.

Original issue reported on code.google.com by mich...@firebase.com on 4 Feb 2014 at 12:22

GoogleCodeExporter commented 8 years ago
Fixed, see https://github.com/google/closure-library/issues/9

Original comment by joelt...@google.com on 20 Jul 2015 at 7:58