Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14337 closed bug (notabug)

Trim in val() form field method

Reported by: rapomon@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

When I try to get a value from an input type email, jquery is trimming the value!

Example: http://rapomon.no-ip.info/jquery-bug.png

Change History (3)

comment:1 Changed 7 years ago by rapomon@…

comment:2 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed

jQuery is not trimming the value, it's trimmed before we see it.

http://jsfiddle.net/BEjvq/1/

If you look at the spec, a space would NOT be valid and shouldn't be there, so I assume the browser is trimming it, although that still doesn't make the value property valid.

http://www.w3.org/TR/html-markup/input.email.html

comment:3 Changed 7 years ago by rapomon@…

It's true, an email value don't allow spaces. Thanks.

Note: See TracTickets for help on using tickets.