From 2ffc921163c0d598d49ed1ff9717bf805fd3d936 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 20 Jun 2021 11:55:24 +0200 Subject: [PATCH] Stop encoding the value in the `DOMElement.setAttribute` method (issue 8558) This patch is an attempt at closing an old, and seemingly trivial, issue and the SVG-files created by the `pdf2svg.js` examples still appear to work just fine when opened in browsers (tested with Firefox Nightly and Google Chrome Beta). --- examples/node/domstubs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/node/domstubs.js b/examples/node/domstubs.js index 1d1039a0b..19c541209 100644 --- a/examples/node/domstubs.js +++ b/examples/node/domstubs.js @@ -93,9 +93,7 @@ DOMElement.prototype = { }, setAttribute: function DOMElement_setAttribute(name, value) { - value = value || ""; - value = xmlEncode(value); - this.attributes[name] = value; + this.attributes[name] = value || ""; }, setAttributeNS: function DOMElement_setAttributeNS(NS, name, value) {