You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/12/02 23:06:54 UTC

git commit: CB-3035 Fix issue with windows new line char \n\r

Updated Branches:
  refs/heads/dev f815ff97d -> 12ac1fd03


CB-3035 Fix issue with windows new line char \n\r


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/12ac1fd0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/12ac1fd0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/12ac1fd0

Branch: refs/heads/dev
Commit: 12ac1fd036387968d3a13cf4ba1a94aa42336d10
Parents: f815ff9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Dec 2 14:02:15 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Dec 2 14:02:15 2013 -0800

----------------------------------------------------------------------
 src/wp/Contacts.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/12ac1fd0/src/wp/Contacts.cs
----------------------------------------------------------------------
diff --git a/src/wp/Contacts.cs b/src/wp/Contacts.cs
index d68b0b1..7883be2 100644
--- a/src/wp/Contacts.cs
+++ b/src/wp/Contacts.cs
@@ -677,7 +677,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
             //Debug.WriteLine("jsonContact = " + jsonContact);
             // JSON requires new line characters be escaped
-            return "{" + jsonContact.Replace("\n", "\\n") + "}";
+            return "{" + jsonContact.Replace("\n", "\\n").Replace("\r","") + "}";
         }
     }
 }