Closed Bug 1310077 Opened 8 years ago Closed 8 years ago

Implement the value sanitizing algorithm for <input type=datetime-local>

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: jessica, Assigned: jessica)

References

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Assignee: nobody → jjong
Attached patch patch, v1. (obsolete) — Splinter Review
Attached patch patch, v1. (obsolete) — Splinter Review
Attachment #8808530 - Attachment is obsolete: true
Attachment #8808539 - Flags: review?(bugs)
Comment on attachment 8808539 [details] [diff] [review]
patch, v1.

>+    // For datetime-local
>+    "1970-01-01T00:00",
>+    "1970-01-01Z12:00",
>+    "1970-01-01 00:00:00",
>+    "1970-01-01T00:00:00.0",
>+    "1970-01-01T00:00:00.00",
>+    "1970-01-01T00:00:00.000",
>+    "1970-01-01 00:00:00.20",
>+    "2016-11-08 15:40:30.0",
>+    "2016-11-08T15:40:30.00",
>+    "2016-11-07T17:30:10",
>+    "2016-12-1T12:45",
>+    "2016-12-01T12:45:30.123456",
>+    "2016-12-01",
>+    "2016-12-01T",
>+    "2016-Dec-01T00:00",
>+    "12-05-2016T00:00",
do we have tests for cases where seconds is 60 or more? Or minutes, or hours more than 23?
Attachment #8808539 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #3)
> Comment on attachment 8808539 [details] [diff] [review]
> patch, v1.
> 
> >+    // For datetime-local
> >+    "1970-01-01T00:00",
> >+    "1970-01-01Z12:00",
> >+    "1970-01-01 00:00:00",
> >+    "1970-01-01T00:00:00.0",
> >+    "1970-01-01T00:00:00.00",
> >+    "1970-01-01T00:00:00.000",
> >+    "1970-01-01 00:00:00.20",
> >+    "2016-11-08 15:40:30.0",
> >+    "2016-11-08T15:40:30.00",
> >+    "2016-11-07T17:30:10",
> >+    "2016-12-1T12:45",
> >+    "2016-12-01T12:45:30.123456",
> >+    "2016-12-01",
> >+    "2016-12-01T",
> >+    "2016-Dec-01T00:00",
> >+    "12-05-2016T00:00",
> do we have tests for cases where seconds is 60 or more? Or minutes, or hours
> more than 23?

Sure, I'll add tests for those cases.
Attached patch patch, v2.Splinter Review
added more tests, carrying r+.
Attachment #8808539 - Attachment is obsolete: true
Attachment #8809302 - Flags: review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ea6f2450459
Implement the value sanitizing algorithm for <input type=datetime-local>. r=smaug
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6ea6f2450459
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Blocks: 1325009
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: