Ticket #5618 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Produces invalid URLs

Reported by: lostclus@gmail.com Assigned to: esm
Priority: normal Component: TracSitemapPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

TracSitemap don't use URL quoting. Some special characters and unicode characters must be quoted. For example:

<loc>http://example.org/wiki/Скачать</loc>

should be:

<loc>http://example.org/wiki/%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C</loc>

Solution: look at the Trac source code and you see that Trac uses special functions to build URLs. This functions knows about all special characters that must be quoted.

Instead of writing:

'wiki/%s' % (row[0],)

write:

req.href('wiki', row[0])

And remember that req.href() adds req.base_path automatically.

Attachments

Change History

11/13/09 23:51:08 changed by esm

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r7132.


Add/Change #5618 (Produces invalid URLs)




Change Properties
Action