sprockets-dotjs 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  function encodeHTMLSource() {
2
- var encodeHTMLRules = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': '&#34;', "'": '&#39;', "/": '&#47;', "\n": '<br>' },
3
- matchHTML = /&(?!#?\w+;)|<|>|"|'|\/\n/g;
2
+ var encodeHTMLRules = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': '&#34;', "'": '&#39;', "/": '&#47;'},
3
+ matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
4
4
  return function() {
5
- return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : this;
5
+ return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m; }).replace(/\n/,'<br>') : this;
6
6
  };
7
7
  }
8
8
  String.prototype.encodeHTML = encodeHTMLSource();
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Dotjs
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-dotjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets