Skip to content

Commit

Permalink
Always wrap datetime-local in safe
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Oct 3, 2023
1 parent ef01ed3 commit 02dbf7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/phoenix_html/form_test.exs
Expand Up @@ -102,8 +102,10 @@ defmodule Phoenix.HTML.FormTest do
assert normalize_value("datetime-local", ~N[2017-09-21 20:21:53]) ==
{:safe, ["2017-09-21", ?T, "20:21"]}

assert normalize_value("datetime-local", "2017-09-21 20:21:53") == "2017-09-21 20:21:53"
assert normalize_value("datetime-local", "other") == "other"
assert normalize_value("datetime-local", "2017-09-21 20:21:53") ==
{:safe, "2017-09-21 20:21:53"}

assert normalize_value("datetime-local", "other") == {:safe, "other"}
end

test "for textarea" do
Expand Down

0 comments on commit 02dbf7f

Please sign in to comment.