diff --git a/lib/floki/raw_html.ex b/lib/floki/raw_html.ex index 41e72b9c..108812ce 100644 --- a/lib/floki/raw_html.ex +++ b/lib/floki/raw_html.ex @@ -178,6 +178,7 @@ defmodule Floki.RawHTML do case type do "script" -> @no_encoder "style" -> @no_encoder + "title" -> @no_encoder _ -> encoder end diff --git a/test/floki_test.exs b/test/floki_test.exs index a4fce9db..7605d02c 100644 --- a/test/floki_test.exs +++ b/test/floki_test.exs @@ -563,6 +563,12 @@ defmodule FlokiTest do assert recombined end + test "raw_html treats the contents of title tags as plain text" do + html_string = ~s(