richurls 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xml_handler.rb +7 -1
- data/richurls.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dbdaf4f9df0bf062450ca64a1957cc50c0dfe50e634385d5eb0de5e0d851eb9
|
4
|
+
data.tar.gz: 297cdeede9eef0a557edaa3c628597beeaeb8508e79bb22f23dc96de0dbdcc54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d04c4edf4dfdbfb04898200a1b159cf6bb2db1a510389842c9cf53f56396bb980fe4984c144b152bde6af63f586fe4df8414ea1dae04b736ae099b18dec5ce0
|
7
|
+
data.tar.gz: 03d4333c1d937006a1e0295e31bc919108a6765d8a42710ad50b20650ddb0bd669fa8fb6f0c1fb1b6564f70c37fe574ea26359bc47ca771cdb2ec7a864d77372
|
data/Gemfile.lock
CHANGED
data/lib/xml_handler.rb
CHANGED
@@ -48,12 +48,18 @@ module RichUrls
|
|
48
48
|
el = @elements.last
|
49
49
|
el.attributes[name] = str
|
50
50
|
|
51
|
-
raise StopParsingError if name
|
51
|
+
raise StopParsingError if stop?(name, el)
|
52
52
|
end
|
53
53
|
|
54
54
|
def text(str)
|
55
55
|
el = @elements.last
|
56
56
|
el && el.attributes[:text].nil? && el.attributes[:text] = str
|
57
57
|
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def stop?(name, elem)
|
62
|
+
name == WHITELISTED_ATTRS.last && elem.name == :img
|
63
|
+
end
|
58
64
|
end
|
59
65
|
end
|
data/richurls.gemspec
CHANGED