Skip to content

Commit

Permalink
Fixed attributes getting escaped multiple times because of passing by…
Browse files Browse the repository at this point in the history
… reference
  • Loading branch information
jgarber committed Mar 15, 2009
1 parent bfe97ef commit def3f3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/redcloth_scan/redcloth_scan.rb.rl
Expand Up @@ -41,9 +41,10 @@ module RedCloth
return RedCloth::RedclothInline.redcloth_inline2(self, textile_doc, refs)
end

def html_esc(str, level=nil)
return "" if str.nil? || str.empty?
def html_esc(input, level=nil)
return "" if input.nil? || input.empty?

str = input.dup
str.gsub!('&') { amp({}) }
str.gsub!('>') { gt({}) }
str.gsub!('<') { lt({}) }
Expand Down

0 comments on commit def3f3e

Please sign in to comment.