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 +4 -4
- data/VERSION +1 -1
- data/lib/string_master/string_master.rb +1 -1
- data/spec/lib/string_master/string_master_spec.rb +3 -0
- data/string_master.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0eaec051d2dbc06d799a8ed6867a941bbfa5849
|
4
|
+
data.tar.gz: 32dc7c3c8c233262e550a031b192b3f0e96d0cb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c769043d0766719506d6d23cf78e231b75165ed9504ac192876e7b8bc41cc753da88fe9a01f18aef35abc010297979828793876be1d28f867181807b9f61aa45
|
7
|
+
data.tar.gz: 27d378deb27618fdbe39bd26dec66c19cba0dbb92ce9c6a8ac2bfca6b2bea8d1f4c3323c05fb3fb7e2609da2ff8214c1e1406f215b89a81fcac75cde3eaa5dd0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
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"
|
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"><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
|
data/string_master.gemspec
CHANGED
@@ -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.
|
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.
|
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"]
|