zetaben-Html2Feedbooks 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/feedbooks.rb +4 -2
- metadata +1 -1
data/lib/feedbooks.rb
CHANGED
@@ -104,14 +104,16 @@ module HTML2FB
|
|
104
104
|
|
105
105
|
class Text
|
106
106
|
def to_feedbooks(conf,path=nil)
|
107
|
-
|
107
|
+
stxt=to_html
|
108
|
+
return unless stxt.strip.size > 0
|
109
|
+
doc=Hpricot('<div xmlns:xhtml="http://www.w3.org/1999/xhtml">'+stxt+'</div>')
|
108
110
|
doc.traverse_all_element do |e|
|
109
111
|
unless e.is_a?Hpricot::Text
|
110
112
|
e.stag.name='xhtml:'+e.stag.name
|
111
113
|
e.etag.name='xhtml:'+e.etag.name unless e.etag.nil?
|
112
114
|
end
|
113
115
|
end
|
114
|
-
FBPost.push(conf,'',doc.to_html,"Text",path)
|
116
|
+
FBPost.push(conf,'',doc.to_html,"Text",path)
|
115
117
|
end
|
116
118
|
end
|
117
119
|
end
|