From ac10dc21ce4c6bc026470b6f0a7a812efb64c0fb Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Wed, 26 Jul 2017 20:38:34 +0000 Subject: [PATCH] Simplified JavaScript code to use single quotes for XML code generation, so that double quotes within text don't need escape. --- javascript/qrcodegen.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 14416cd..4f28398 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -208,11 +208,11 @@ var qrcodegen = new function() { this.toSvgString = function(border) { if (border < 0) throw "Border must be non-negative"; - var result = "\n"; - result += "\n"; - result += "\n"; - result += "\t\n"; - result += "\t\n'; + result += '\t\n'; + result += '\t\n"; - result += "\n"; + result += '" fill="#000000"/>\n'; + result += '\n'; return result; };