Skip to content

Commit

Permalink
Add an HTML-escape helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
octopusinvitro committed Nov 18, 2016
1 parent 6f757b7 commit 7718fd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/html_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# frozen_string_literal: true
module HTMLHelper
def escape_html(text)
Rack::Utils.escape_html(text)
end

def unescape_uri(text)
CGI.unescape(text)
end
Expand Down

0 comments on commit 7718fd0

Please sign in to comment.