Modify

Opened 5 years ago

Last modified 3 years ago

#6379 new defect

ValueError: Can't send unicode content

Reported by: anonymous Owned by: coderanger
Priority: normal Component: RobotsTxtPlugin
Severity: blocker Keywords: unicode
Cc: Trac Release: 0.12

Description

Running trac HEAD and attempting to use RobotsTxt plugin.

The wiki page contains three open-brace characters, followed by the sample robots.txt content and then three close-brace characters. When navigating to /robots.txt, I get the error:

ValueError: Can't send unicode content

Attachments (1)

robotstxt-trac-0.12.patch (476 bytes) - added by eseifert 3 years ago.
Patch for Trac 0.12 compatibility

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by eseifert

Patch for Trac 0.12 compatibility

comment:1 Changed 3 years ago by eseifert

  • Keywords unicode added

Added a patch that resolved the issue for me. It checks for unicode content and encodes it to a normal string. Additionally the patch removes leading and trailing new lines and spaces from the page content.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.