Edgewall Software

Opened 17 years ago

Closed 17 years ago

#212 closed defect (invalid)

MarkupTemplate bug

Reported by: hauptmann@… Owned by: cmlenz
Priority: major Milestone:
Component: General Version: 0.4.4
Keywords: Cc:

Description

this line doesn't work. i think this is a bug?

return MarkupTemplate?("<input type='radio' value='1' />aa <input type='radio' value='2' />bb")

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/cherrypy/_cprequest.py", line 551, in respond

cherrypy.response.body = self.handler()

File "/usr/lib/python2.4/site-packages/cherrypy/_cpdispatch.py", line 24, in call

return self.callable(*self.args, self.kwargs)

File "/home/hauptmj/workspace/RaumOrdnungen/server.py", line 241, in view

return stream.render('html', doctype='html')

File "build/bdist.linux-i686/egg/genshi/core.py", line 154, in render File "build/bdist.linux-i686/egg/genshi/output.py", line 45, in encode File "build/bdist.linux-i686/egg/genshi/output.py", line 369, in call File "build/bdist.linux-i686/egg/genshi/output.py", line 618, in call File "build/bdist.linux-i686/egg/genshi/output.py", line 679, in call File "build/bdist.linux-i686/egg/genshi/output.py", line 459, in call File "build/bdist.linux-i686/egg/genshi/core.py", line 212, in _ensure File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 252, in _include File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 322, in _match File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 252, in _include File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 297, in _match File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 286, in _strip File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 242, in _exec File "build/bdist.linux-i686/egg/genshi/template/base.py", line 421, in _eval File "build/bdist.linux-i686/egg/genshi/template/eval.py", line 136, in evaluate File "/home/hauptmj/workspace/RaumOrdnungen/templates/kleinfund_edit.html", line 66, in <Expression u"getBooleanWidget('webfreigabe',objekt.webfreigabe).generate()">

${getBooleanWidget('webfreigabe',objekt.webfreigabe).generate()}

File "/home/hauptmj/workspace/RaumOrdnungen/viewclass.py", line 37, in getBooleanWidget

return MarkupTemplate?("<input type='radio' value='1' />aa <input type='radio' value='2' />bb")

File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 75, in init File "build/bdist.linux-i686/egg/genshi/template/base.py", line 322, in init

TemplateSyntaxError?: junk after document element: line 1, column 32 (None, line 1)

Change History (1)

comment:1 Changed 17 years ago by cmlenz

  • Milestone 0.5 deleted
  • Resolution set to invalid
  • Status changed from new to closed

No, that's not well-formed XML/XHTML. XML needs a single root element. I.e. you'd need to wrap that it in a common container element to make it well-formed.

Note: See TracTickets for help on using tickets.