diff --git a/lib/js2xml.js b/lib/js2xml.js
index <HASH>..<HASH> 100644
--- a/lib/js2xml.js
+++ b/lib/js2xml.js
@@ -42,7 +42,7 @@ function writeAttributes(attributes, options) {
     var key, result = '';
     for (key in attributes) {
         if (attributes.hasOwnProperty(key)) {
-            result += ' ' + key + '="' + writeText(attributes[key], {}) + '"';
+            result += ' ' + key + '="' + writeText(attributes[key], options) + '"';
         }
     }
     return result;
pass over 'options' object from writeAttributes() to writeText()