entities 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/encode.js CHANGED
@@ -28,7 +28,7 @@ function getInverseReplacer(inverse){
28
28
  });
29
29
 
30
30
  //TODO add ranges
31
- multiple.unshift("[" + single.join() + "]");
31
+ multiple.unshift("[" + single.join("") + "]");
32
32
 
33
33
  return new RegExp(multiple.join("|"), "g");
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "entities",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Encode & decode XML/HTML entities with ease",
5
5
  "author": "Felix Boehm <me@feedic.com>",
6
6
  "keywords": [
package/test/test.js CHANGED
@@ -40,6 +40,11 @@ describe("Encode->decode test", function(){
40
40
  assert.equal(entities.decodeHTML(encodedHTML5), tc.input);
41
41
  });
42
42
  });
43
+
44
+ it("should encode data URIs (issue 16)", function(){
45
+ var data = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAALAAABAAEAAAIBRAA7";
46
+ assert.equal(entities.decode(entities.encode(data)), data);
47
+ });
43
48
  });
44
49
 
45
50
  describe("Decode test", function(){