Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugfix

  • Loading branch information...
commit 376dd51b84cc6f3450e33d833df1928749bbe801 1 parent 45747d3
@dann dann authored
Showing with 24 additions and 16 deletions.
  1. +1 −1  Gemfile.lock
  2. +1 −1  VERSION
  3. +8 −9 atomutil.gemspec
  4. +14 −5 lib/atomutil.rb
View
2  Gemfile.lock
@@ -7,7 +7,7 @@ GEM
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
- rake (0.8.7)
+ rake (0.9.2)
rcov (0.9.9)
rspec (2.4.0)
rspec-core (~> 2.4.0)
View
2  VERSION
@@ -1 +1 @@
-0.1.1
+0.1.3
View
17 atomutil.gemspec
@@ -4,16 +4,15 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{atomutil}
- s.version = "0.1.1"
+ s.name = "atomutil"
+ s.version = "0.1.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["lyokato"]
- s.date = %q{2011-01-07}
- s.description = %q{This library allows your to handle AtomPub and Atom Feed easily}
- s.email = %q{lyo.kato@gmail.com}
+ s.date = "2011-09-29"
+ s.description = "This library allows your to handle AtomPub and Atom Feed easily"
+ s.email = "lyo.kato@gmail.com"
s.extra_rdoc_files = [
- "LICENSE.txt",
"README.rdoc"
]
s.files = [
@@ -41,11 +40,11 @@ Gem::Specification.new do |s|
"spec/spec_helper.rb",
"spec/threading_spec.rb"
]
- s.homepage = %q{http://github.com/lyokato/ruby-atomutil}
+ s.homepage = "http://github.com/lyokato/ruby-atomutil"
s.licenses = ["MIT"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.4.2}
- s.summary = %q{Ruby AtomPub Client}
+ s.rubygems_version = "1.8.10"
+ s.summary = "Ruby AtomPub Client"
s.test_files = [
"spec/categories_spec.rb",
"spec/category_spec.rb",
View
19 lib/atomutil.rb
@@ -55,7 +55,7 @@ module AtomUtil
module VERSION#:nodoc:
MAJOR = 0
MINOR = 1
- TINY = 1
+ TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
@@ -592,7 +592,7 @@ def to_s(*)
doc = REXML::Document.new
decl = REXML::XMLDecl.new("1.0", "utf-8")
doc.add decl
- doc.add_element @elem.deep_clone
+ doc.add_element @elem
doc.to_s
end
private
@@ -753,14 +753,23 @@ def initialize(params={})
end
def body=(value)
- if value =~ /^(?:
- [[:print:]]
+
+ if value =~ Regexp.new("^(?:
+ [[:print:]]
|[\xc0-\xdf][\x80-\xbf]
|[\xe0-\xef][\x80-\xbf]{2}
|[\xf0-\xf7][\x80-\xbf]{3}
|[\xf8-\xfb][\x80-\xbf]{4}
|[\xfc-\xfd][\x80-\xbf]{5}
- )*$/x
+ )*$", Regexp::EXTENDED, 'n')
+ #if value =~ /^(?:
+ # [[:print:]]
+ # |[\xc0-\xdf][\x80-\xbf]
+ # |[\xe0-\xef][\x80-\xbf]{2}
+ # |[\xf0-\xf7][\x80-\xbf]{3}
+ # |[\xf8-\xfb][\x80-\xbf]{4}
+ # |[\xfc-\xfd][\x80-\xbf]{5}
+ # )*$/x
copy = "<div xmlns=\"http://www.w3.org/1999/xhtml\">#{value}</div>"
is_valid = true
begin
Please sign in to comment.
Something went wrong with that request. Please try again.