Opened 12 years ago

Closed 12 years ago

#134 closed defect (wontfix)

helloworld doesn't work as advertized with 0.93

Reported by: villaume Owned by: Alec Thomas
Priority: normal Component: TracHacks
Severity: normal Keywords: egg, helloworld, Markup
Cc: Trac Release:


when I run the helloworld egg example with python 2.3 and trac 0.93.

Instead of a button in the nav bar, I get this, verbatim:

<a href="/trac/helloworld">Hello</a> 

-- no borders and it's clearly not a link. So it's doing the string substitution, but not making a button.

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by villaume

The fix, as suggested by Brad Anderson <> and Jani Tiainen <redetin@…>, involves the Markup class.

Two lines need to be changed (I'd submit a patch, but I don't know how to do this on W2K): Instead of

from trac.util import escape 

add Markup, like this:

from trac.util import escape, Markup

Then, instead of

   def get_navigation_items(self, req):
        yield 'mainnav', 'helloworld', '<a href="%s">Hello</a>' \
                                  % escape(self.env.href.helloworld())

use the Markup class like this:

   def get_navigation_items(self, req):
        yield 'mainnav', 'helloworld', Markup('<a href="%s">Hello</a>' 
                                  % escape(self.env.href.helloworld()))

This installs and runs fine for me.

comment:2 Changed 12 years ago by villaume

my bad, those changes are in the file.

comment:3 Changed 12 years ago by Alec Thomas

This is a collaborative Wiki, you can make these changes yourself. Just edit the page to update the browsable version, and upload a new ZIP file with an appropriate comment about 0.9.3 compatibility.

comment:4 Changed 12 years ago by Alec Thomas

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Alec Thomas.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.