Opened 8 years ago

Closed 2 years ago

#1822 closed defect (wontfix)

spaces in username not escaped when using $U

Reported by: robspassky Owned by: pacopablo
Priority: normal Component: TracBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


I'm setting a trac where each user can have their own blog, so I use the $U in the blog page name. But I also have users with spaces in their names, and they were ending making invalid pages.

I fixed it by putting the following into

"from urllib import quote"

and around line 140 (right before "if req.method == 'POST'"), I put:

"pagename = quote(pagename)"

That seemed to resolve it.

This is for 0.10.

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by robspassky

I'm sorry, that fix didn't work. I mean, the page is found, but the URL is messed up:


I'll look at it and try again.

comment:2 Changed 8 years ago by robspassky

I tried to do the quoting further upstream, in the base trac code for wiki links. And also in the TracBlog ClearSilver template blog.cs. Both times the url got badly garbled with a "href%...%...not found..." something or other.

I'm afraid I don't know enough about Trac's rendering process to fix it properly.

So, since I have to move on, I just stripped out the spaces:

pagename = re.sub(r' ', , pagename)

This is in, right before the "if req.method == 'POST':"

comment:3 Changed 2 years ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

TracBlogPlugin is only for 0.10, as noted on the wiki page. Trac 0.10 is dead now. For blog support, see FullBlogPlugin, which works for Trac 0.11 and later.

Add Comment

Modify Ticket

as closed The owner will remain pacopablo.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.