Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#9753 closed bug (invalid)

Setting option value (containing space) using append

Reported by: madhurs99 Owned by:
Priority: low Milestone: 1.next
Component: manipulation Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


Appending new option using below code

var OptionDesc = "United Kingdom";
var OptionValue = "United Kingdom"
$('select').append("<Option value="+OptionValue+" >"+OptionDesc+"</Option>");

generates wrong HTML

<option value="United" kingdom="">United Kingdom</option>

Change History (3)

comment:1 Changed 12 years ago by madhurs99

Please find below the test case for the same


comment:2 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

The value attribute needs to be quoted if it contains spaces.

comment:3 Changed 12 years ago by timmywil

Component: unfiledmanipulation
Priority: undecidedlow
Note: See TracTickets for help on using tickets.