spix_parser 1.7.5 → 1.7.6
Sign up to get free protection for your applications and to get access to all the features.
data/lib/spix_parser/parser.rb
CHANGED
data/lib/spix_parser/version.rb
CHANGED
@@ -30,7 +30,7 @@ describe Spix::Parser do
|
|
30
30
|
|
31
31
|
it "should parse correctly images with absolute with another domain" do
|
32
32
|
feed = Spix::Parser.parse(load_fixture('feed_with_absolute_images_from_another_domain.atom'), :mode => :local)
|
33
|
-
feed.feed_items.first.content[/<img.*src
|
33
|
+
feed.feed_items.first.content[/<img.*src=["'](.*?)["'].*\/>/, 1].should == "http://oglobo.globo.com/fotos/2011/07/06/06_MHB_ballmer.jpg"
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -9,7 +9,7 @@ describe Spix::Utils do
|
|
9
9
|
input_html = %q[<div><a href="/foo/bar.html" title="FooBar!">FooBar!</a></div>]
|
10
10
|
|
11
11
|
Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
|
12
|
-
%q[<div><a href
|
12
|
+
%q[<div><a href="http://busk.com/foo/bar.html" title="FooBar!" target="_blank" rel="external nofollow">FooBar!</a></div>]
|
13
13
|
end
|
14
14
|
|
15
15
|
it "parses link tags with absolute sources" do
|
@@ -44,7 +44,7 @@ describe Spix::Utils do
|
|
44
44
|
input_html = %q[<div><a href="foo/bar.html" title="FooBar!">FooBar!</a></div>]
|
45
45
|
|
46
46
|
Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
|
47
|
-
%q[<div><a href
|
47
|
+
%q[<div><a href="http://busk.com/foo/bar.html" title="FooBar!" target="_blank" rel="external nofollow">FooBar!</a></div>]
|
48
48
|
end
|
49
49
|
|
50
50
|
it "parses links with html attributes without quotes, based on spaces" do
|
@@ -161,14 +161,14 @@ describe Spix::Utils do
|
|
161
161
|
input_html = %q[<div><img src="images/bar.jpg" title="FooBar!" /></div>]
|
162
162
|
|
163
163
|
Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
|
164
|
-
%q[<div><img src
|
164
|
+
%q[<div><img src="http://busk.com/images/bar.jpg" title="FooBar!" /></div>]
|
165
165
|
end
|
166
166
|
|
167
167
|
it "parses image tags with html escaped quote (") and absolute sources" do
|
168
168
|
input_html = %q[<div><img src="http://busk.com/images/bar.jpg" title="FooBar!" /></div>]
|
169
169
|
|
170
170
|
Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
|
171
|
-
%q[<div><img src
|
171
|
+
%q[<div><img src="http://busk.com/images/bar.jpg" title="FooBar!" /></div>]
|
172
172
|
end
|
173
173
|
|
174
174
|
it "parses image tags with absolute sources" do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: spix_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.7.
|
5
|
+
version: 1.7.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marcio Lopes de Faria
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-07-
|
14
|
+
date: 2011-07-13 00:00:00 -03:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|