webpy/webpy — pull request #279 by nopri (2014-02-17 23:36:29+00:00)
Title: using safestr in web.form.Dropdown._render_option

Convert to str (using safestr) before value comparison.

Old behavior (notice the second example):

```python
d = Dropdown(name='a', args=[1,2,3], value=1)
>>> d.render()
u'\n
1
\n
2
\n
3
\n\n'
>>>
>>> d = Dropdown(name='a', args=[1,2,3], value='1')
>>> d.render()
u'\n
1
\n
2
\n
3
\n\n'
>>>
```

New behavior (also notice the second example):

```python
>>> d = Dropdown(name='a', args=[1,2,3], value=1)
>>> d.render()
u'\n
1
\n
2
\n
3
\n\n'
>>>
>>> d = Dropdown(name='a', args=[1,2,3], value='1')
>>> d.render()
u'\n
1
\n
2
\n
3
\n\n'
>>>
```