Opened 17 years ago
Closed 17 years ago
#6251 closed defect (duplicate)
ticket description sometimes fails with rendering error
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.10.4 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
My installation of trac (0.10.4) has an error when rendering tickets with too many weird things in between <%
and %>
. This is fairly common for error reports that contain rhtml or asp (etc). I'm not certain that <%
and %>
are what are triggering the problem… but I've tried to narrow it down to a small bit of text that will cause the problem.
This ticket will try to trigger this with its description:
<%= foobar, { :foo ⇒ 'foos', :bar ⇒ 'bar', :blah⇒@bar.blah("#{foobar}_blah").id }, :id⇒"#{bleh}_blah" %>
Attachments (0)
Change History (6)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
FWIW, there are two versions of this bug on my installation: in one version rendering simply stops in the middle of some text (leaving the page half rendered, with no edit form). I've never seen anything in the trac log when that happens. In the other version, I get an error page whenever I try to render the ticket. Here is the exception it shows me:
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 244, in dispatch req.display(template, content_type or 'text/html') File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 358, in display data = self.hdf.render(template, form_token) File "/usr/lib/python2.4/site-packages/trac/web/clearsilver.py", line 296, in render injector.feed(template.render()) File "/usr/lib/python2.4/HTMLParser.py", line 108, in feed self.goahead(0) File "/usr/lib/python2.4/HTMLParser.py", line 148, in goahead k = self.parse_starttag(i) File "/usr/lib/python2.4/HTMLParser.py", line 226, in parse_starttag endpos = self.check_for_whole_start_tag(i) File "/usr/lib/python2.4/HTMLParser.py", line 301, in check_for_whole_start_tag self.error("malformed start tag") File "/usr/lib/python2.4/HTMLParser.py", line 115, in error raise HTMLParseError(message, self.getpos()) HTMLParseError: malformed start tag, at line 103, column 79
comment:3 by , 17 years ago
Version: | → 0.10.4 |
---|
comment:4 by , 17 years ago
Also, both versions of the bug go away when you surround the text with {{{
and }}}
comment:5 by , 17 years ago
Keywords: | needinfo added |
---|
Aren't you using SilverCity highlighting, which is known to generate malformed HTML with some input? (see e.g. #4365)
If you're using the {{{ ... }}}
blocks without specifying a processor, things will work, but if you're specifying a #!xyz
line, this is what should trigger the issue.
However I don't see how the bug could be triggered without any code block at all. Maybe a faulty plugin as you said?
Can you show us the original wiki text of the ticket and comments from the db, as well as the rendering of ticket page when you temporarily disable the form token injector?
-
trac/web/api.py
355 355 else: 356 356 form_token = None 357 357 if content_type in ('text/html', 'application/xhtml+xml'): 358 form_token = self.form_token358 pass # form_token = self.form_token 359 359 data = self.hdf.render(template, form_token) 360 360 361 361 self.send_response(status)
comment:6 by , 17 years ago
Keywords: | needinfo removed |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Interesting… the t.e.o installation doesn't seem to have the bug, or at least isn't triggered by the same text that would trigger the bug on my installation. Perhaps a plugin I have is causing the issue?