sprockets-dotjs 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ window.encodeHTML=(function encodeHTMLSource() {
2
+ var encodeHTMLRules = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': '&#34;', "'": '&#39;', "/": '&#47;' },
3
+ matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
4
+ return function(code) {
5
+ return code ? code.toString().replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : '';
6
+ };
7
+ }());
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Dotjs
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.0"
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: 1.0.1
4
+ version: 1.1.0
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: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2012-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -89,6 +89,7 @@ files:
89
89
  - MIT-LICENSE
90
90
  - README.md
91
91
  - Rakefile
92
+ - lib/assets/javascripts/encode_html.js
92
93
  - lib/sprockets-dotjs.rb
93
94
  - lib/sprockets-dotjs/version.rb
94
95
  - lib/sprockets/dotjs/compiler.rb