summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--encoding.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/encoding.js b/encoding.js
index 1370eb7..a0864ea 100644
--- a/encoding.js
+++ b/encoding.js
@@ -35,10 +35,10 @@ function decode_quotedprintable( str ) {
35 var lines = str.replace( /_/g, " ").split( "=" ); 35 var lines = str.replace( /_/g, " ").split( "=" );
36 var outstring = [ lines[0] ]; 36 var outstring = [ lines[0] ];
37 for( var i=1; i< lines.length; ++i ) { 37 for( var i=1; i< lines.length; ++i ) {
38 if( lines[i].charCodeAt(1) == 10 ) { 38 if( lines[i].charCodeAt(0) == 10 ) {
39 outstring.push( lines[i].substring( 2 ) ); 39 outstring.push( lines[i].substring( 1 ) );
40 } else { 40 } else {
41 outstring.push( String.fromCharCode( parseInt( lines[i].substring(0,2), 16 ) ), lines[i].substring( 2 ) ) 41 outstring.push( String.fromCharCode( parseInt( lines[i].substring(0,2), 16 ) ), lines[i].substring( 2 ) );
42 } 42 }
43 } 43 }
44 return outstring.join( '' ); 44 return outstring.join( '' );