Closed Bug 1325009 Opened 5 years ago Closed 5 years ago

Year component in input type=datetime-local can be 4 digits or more

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jessica, Assigned: jessica)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1310077, I used a fixed index for the separator ("T" or " "), but year component can be 4 digits or more, so we should find the separator index dynamically.
Attached patch patch, v1. (obsolete) — Splinter Review
Comment on attachment 8820602 [details] [diff] [review]
patch, v1.

Please refer to comment 0 for details. Thanks!
Attachment #8820602 - Flags: review?(bugs)
Comment on attachment 8820602 [details] [diff] [review]
patch, v1.

Could you add also tests for ' ', not only 'T' use.
Attachment #8820602 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #3)
> Comment on attachment 8820602 [details] [diff] [review]
> patch, v1.
> 
> Could you add also tests for ' ', not only 'T' use.

Sure, will do.
Attached patch patch, v2.Splinter Review
added more tests, carrying r+.
Attachment #8820602 - Attachment is obsolete: true
Attachment #8821003 - Flags: review+
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3fe0ff6bef8b
Find separator index dynamically when sanitizing input type=datetime-local. r=smaug
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3fe0ff6bef8b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.