string_master 0.3.17 → 0.3.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65b46ed19ff7d378035aa69b0e7437f673b34ee4
4
- data.tar.gz: 9fcc5db858dad0ce147490a919b4540156a494f3
3
+ metadata.gz: a0eaec051d2dbc06d799a8ed6867a941bbfa5849
4
+ data.tar.gz: 32dc7c3c8c233262e550a031b192b3f0e96d0cb3
5
5
  SHA512:
6
- metadata.gz: 38f73d7726541ba881426a86d1e610667401a356c967cca8985be341d90d5fd8f5ffcec9423265c15461c0ccc408de1f6986d9c81c4a10e26abfd7245c356e5a
7
- data.tar.gz: 1b4bf6defcf62e4bad90e6a4d505eb221b21a5d875892ddb273ed4346d6a50b4cce9df45f43c7ed369d80ba196418cecb100820b8362cfd68648fd86d412140a
6
+ metadata.gz: c769043d0766719506d6d23cf78e231b75165ed9504ac192876e7b8bc41cc753da88fe9a01f18aef35abc010297979828793876be1d28f867181807b9f61aa45
7
+ data.tar.gz: 27d378deb27618fdbe39bd26dec66c19cba0dbb92ce9c6a8ac2bfca6b2bea8d1f4c3323c05fb3fb7e2609da2ff8214c1e1406f215b89a81fcac75cde3eaa5dd0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.17
1
+ 0.3.18
@@ -37,7 +37,7 @@ class StringMaster
37
37
  if except.include?($1)
38
38
  # sanitize attributes
39
39
  tag.gsub(/\s(.+?)=('|").*?\2(?=.*?>)/) do |a|
40
- ["href", "src", "lang", "onfocus", "autofocus"].include?($1) ? a : ""
40
+ ["href", "src", "lang"].include?($1) ? a : ""
41
41
  end
42
42
  else
43
43
  h(tag)
@@ -28,6 +28,9 @@ describe StringMaster do
28
28
 
29
29
  parser = StringMaster.new('xsstest"><input/onfocus=prompt() autofocus /=')
30
30
  parser.html_escape.to_s.should == 'xsstest">&lt;input/onfocus=prompt() autofocus /='
31
+
32
+ parser = StringMaster.new('<img onload="do_something()">')
33
+ parser.html_escape(except: %w(img)).to_s.should == '<img>'
31
34
  end
32
35
 
33
36
  it "makes images of urls that end with .jpg and other image extensions" do
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: string_master 0.3.17 ruby lib
5
+ # stub: string_master 0.3.18 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "string_master"
9
- s.version = "0.3.17"
9
+ s.version = "0.3.18"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko