prarupa 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/prarupa/text_helpers.rb +2 -2
- data/lib/prarupa/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -63,7 +63,7 @@ With options:
|
|
63
63
|
To be `:safe`
|
64
64
|
============
|
65
65
|
|
66
|
-
Being Rails text helpers, all three methods accept the `:safe` option that tells the helpers that the input text need not be
|
66
|
+
Being Rails text helpers, all three methods accept the `:safe` option that tells the helpers that the input text need not be escaped.
|
67
67
|
|
68
68
|
Credits
|
69
69
|
=======
|
data/lib/prarupa/text_helpers.rb
CHANGED
@@ -26,7 +26,7 @@ module Prarupa
|
|
26
26
|
#
|
27
27
|
def textilize(text, *options)
|
28
28
|
options ||= [:hard_breaks]
|
29
|
-
text =
|
29
|
+
text = h(text) unless text.html_safe? || options.delete(:safe)
|
30
30
|
|
31
31
|
if text.blank?
|
32
32
|
""
|
@@ -79,7 +79,7 @@ module Prarupa
|
|
79
79
|
# markdown('![The ROR logo](http://rubyonrails.com/images/rails.png "Ruby on Rails")')
|
80
80
|
# # => '<p><img src="http://rubyonrails.com/images/rails.png" alt="The ROR logo" title="Ruby on Rails" /></p>'
|
81
81
|
def markdown(text, *options)
|
82
|
-
text =
|
82
|
+
text = h(text) unless text.html_safe? || options.delete(:safe)
|
83
83
|
|
84
84
|
if text.blank?
|
85
85
|
""
|
data/lib/prarupa/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Rohit Arondekar
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-12 00:00:00 +05:30
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|