Skip to content

Instantly share code, notes, and snippets.

@arthurnn
Created August 5, 2015 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurnn/1beed993edbf04826ead to your computer and use it in GitHub Desktop.
Save arthurnn/1beed993edbf04826ead to your computer and use it in GitHub Desktop.
require 'action_view/railtie'
require 'minitest/autorun'
class BugTest < ActionView::TestCase
tests ActionView::Helpers::SanitizeHelper
def test_strip_tags
assert_equal "This is a headline &lt;h1&gt;Headine 2&lt;/h1&gt;", strip_tags("<h1>This is a headline</h1> &lt;h1&gt;Headine 2&lt;/h1&gt;")
end
end
@arthurnn
Copy link
Author

arthurnn commented Aug 5, 2015

on Rails 4.2:

  1) Failure:
BugTest#test_strip_tags [string_tags_test.rb:8]:
--- expected
+++ actual
@@ -1 +1 @@
-"This is a headline &lt;h1&gt;Headine 2&lt;/h1&gt;"
+"This is a headline <h1>Headine 2</h1>"

@arthurnn
Copy link
Author

arthurnn commented Aug 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment