diff --git a/jsontoxml.js b/jsontoxml.js
index <HASH>..<HASH> 100644
--- a/jsontoxml.js
+++ b/jsontoxml.js
@@ -172,6 +172,7 @@ function esc(str){
   return (''+str).replace(/&/g, '&amp;')
       .replace(/</g, '&lt;')
       .replace(/>/g, '&gt;')
+      .replace(/'/g, '&apos;)
       .replace(/"/g, '&quot;');
 }
add single quote to the set of characters to escape