Author: ianb
Date: 2008-04-18 12:52:53 -0600 (Fri, 18 Apr 2008)
New Revision: 3387
Modified:
FormEncode/trunk/formencode/htmlfill.py
FormEncode/trunk/tests/test_htmlfill.py
Log:
Fixed case for </select>
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2008-04-18 16:55:37 UTC (rev
3386)
+++ FormEncode/trunk/formencode/htmlfill.py 2008-04-18 18:52:53 UTC (rev
3387)
@@ -489,8 +489,10 @@
self.add_key(self.in_select)
def handle_end_select(self):
+ self.write_text('</select>')
+ self.skip_next = True
if not self.prefix_error and self.in_select:
- self.write_marker(name)
+ self.write_marker(self.in_select)
self.in_select = None
def handle_option(self, attrs):
Modified: FormEncode/trunk/tests/test_htmlfill.py
===================================================================
--- FormEncode/trunk/tests/test_htmlfill.py 2008-04-18 16:55:37 UTC (rev
3386)
+++ FormEncode/trunk/tests/test_htmlfill.py 2008-04-18 18:52:53 UTC (rev
3387)
@@ -99,4 +99,6 @@
assert (htmlfill.render('<textarea name="content"></textarea>',
errors={'content': 'error'},
prefix_error=False)
== '<textarea name="content" class="error"></textarea><!-- for:
content -->\n<span class="error-message">error</span><br />\n')
-
+ assert (htmlfill.render('<select name="type"><option
value="foo">foo</option></select>', errors={'type': 'error'},
+ prefix_error=False)
+ == '<select name="type" class="error"><option
value="foo">foo</option></select><!-- for: type -->\n<span
class="error-message">error</span><br />\n')
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs