conred 0.2.2 → 0.2.3
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.
- data/lib/conred/helpers.rb +1 -3
- data/lib/conred/version.rb +1 -1
- metadata +1 -1
data/lib/conred/helpers.rb
CHANGED
|
@@ -14,14 +14,12 @@ module Conred
|
|
|
14
14
|
text = action_view.strip_tags(text)
|
|
15
15
|
if word_count
|
|
16
16
|
action_view.truncate(text, :length => word_count, :omission => omission).html_safe
|
|
17
|
-
elsif text == nil
|
|
18
|
-
""
|
|
19
17
|
else
|
|
20
18
|
text.html_safe
|
|
21
19
|
end
|
|
22
20
|
end
|
|
23
21
|
|
|
24
|
-
def sanitize_body(text)
|
|
22
|
+
def sanitize_body(text = "")
|
|
25
23
|
text = action_view.sanitize(text, :tags => %w(p a strong ul ol li blockquote strike u em), :attributes => %w(href))
|
|
26
24
|
text.html_safe
|
|
27
25
|
end
|
data/lib/conred/version.rb
CHANGED