[jToolkit-cvs] jToolkit/widgets widgets.py,1.6,1.7
Brought to you by:
davidfraser,
friedelwolff
|
From: <dav...@us...> - 2004-02-09 13:34:08
|
Update of /cvsroot/jtoolkit/jToolkit/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1485 Modified Files: widgets.py Log Message: modified gethtml to handle unicode contents/attribs... Index: widgets.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/widgets/widgets.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** widgets.py 9 Feb 2004 12:28:40 -0000 1.6 --- widgets.py 9 Feb 2004 13:30:48 -0000 1.7 *************** *** 35,39 **** def gethtml(self): ! return "<%s %s>%s</%s>\r" % (self.tagname, self.gethtmlattribs(), self.getcontents(), self.tagname) def getcontents(self): --- 35,46 ---- def gethtml(self): ! attribs = self.gethtmlattribs() ! contents = self.getcontents() ! tagname = self.tagname ! if type(attribs) == unicode or type(contents) == unicode: ! tagname = tagname.decode('iso8859') ! if type(attribs) == str: attribs = attribs.decode('iso8859') ! if type(contents) == str: contents = contents.decode('iso8859') ! return u"<%s %s>%s</%s>\r" % (tagname, attribs, contents, tagname) def getcontents(self): |