Opened 9 years ago

Closed 4 years ago

## #1822 closed defect (wontfix)

# spaces in username not escaped when using $U Reported by: Owned by: robspassky pacopablo normal TracBlogPlugin normal 0.10 ### Description 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 new_blog.py:

"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.

### comment:1 Changed 9 years ago by robspassky

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

"xxxx..../wiki/blog/Rob00000000000000000047passky/2007/07/18/19.26"

I'll look at it and try again.

### comment:2 Changed 9 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 new_blog.py, right before the "if req.method == 'POST':"

### comment:3 Changed 4 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.

### Modify Ticket

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

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

Note: See TracTickets for help on using tickets.