spix_parser 1.7.5 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@ module Spix
55
55
 
56
56
  if match_by_spaces = str =~ /'|"|"|"/
57
57
  value_regexp = %r{\s*#{$&}(.*?)#{$&}}
58
- encloser = $&.gsub(/'/, '"')
58
+ encloser = $&.gsub(/'|"|"/, '"')
59
59
  else
60
60
  encloser = "\""
61
61
  str += " "
@@ -4,7 +4,7 @@ module Spix
4
4
  module Version
5
5
  MAJOR = 1
6
6
  MINOR = 7
7
- TINY = 5
7
+ TINY = 6
8
8
 
9
9
  def self.current_version
10
10
  "#{MAJOR}.#{MINOR}.#{TINY}"
@@ -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=&#034;(.*?)&#034;.*\/>/, 1].should == "http://oglobo.globo.com/fotos/2011/07/06/06_MHB_ballmer.jpg"
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=&quot;/foo/bar.html&quot; title=&quot;FooBar!&quot;>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=&quot;http://busk.com/foo/bar.html&quot; title=&quot;FooBar!&quot; target=&quot;_blank&quot; rel=&quot;external nofollow&quot;>FooBar!</a></div>]
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=&quot;foo/bar.html&quot; title=&quot;FooBar!&quot;>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=&quot;http://busk.com/foo/bar.html&quot; title=&quot;FooBar!&quot; target=&quot;_blank&quot; rel=&quot;external nofollow&quot;>FooBar!</a></div>]
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=&quot;images/bar.jpg&quot; title=&quot;FooBar!&quot; /></div>]
162
162
 
163
163
  Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
164
- %q[<div><img src=&quot;http://busk.com/images/bar.jpg&quot; title=&quot;FooBar!&quot; /></div>]
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 (&quot;) and absolute sources" do
168
168
  input_html = %q[<div><img src=&quot;http://busk.com/images/bar.jpg&quot; title=&quot;FooBar!&quot; /></div>]
169
169
 
170
170
  Spix::Utils.format_links(:text => input_html, :site_url => "http://busk.com/").should ==
171
- %q[<div><img src=&quot;http://busk.com/images/bar.jpg&quot; title=&quot;FooBar!&quot; /></div>]
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
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-12 00:00:00 -03:00
14
+ date: 2011-07-13 00:00:00 -03:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency