1234567891011121314151617181920 |
- module EscapeHtmlHelper
-
-
-
-
-
- def escape_html_wo_single_quotes(string)
- single_quote_char = "\u0027"
- replacement_char = "\uFFFD"
- target_string = string.gsub(single_quote_char, replacement_char)
- target_string = CGI.escapeHTML(target_string)
- target_string.gsub(replacement_char, single_quote_char)
- end
- end
- RSpec.configure do |config|
- config.include EscapeHtmlHelper
- end
|