Mailing List Archive

Patch for Ticket #352
I wanted to familiarize myself with Trac, so I pulled an unassigned
ticket off the list and wrote up a patch. Is this generally a safe way
to contribute?

The patch adds a new function to util.py, wiki_escape_newline, which
replaces line breaks with explicit line breaks. This method is then
called on the svn message in most places it is displayed.

Other changes:
* util.shorten_line - if explicit linebreaks ([[BR]]) are encountered,
return only the first line followed by an elipsis
* Log.log_receiver.item['log'] - now calls shorten_line

I'm not sure what is the right thing to do for the RSS feed, so I left
Log.log_receiver.item['log.raw'] alone. I thought that maybe basic html
<br/> tags might be acceptable, but they didn't validate.

--Cap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ticket352
Type: text/x-patch
Size: 3824 bytes
Desc: not available
Url : /archive/trac/attachments/20040607/be9498eb/ticket352.bin
Patch for Ticket #352 [ In reply to ]
On Monday 07 June 2004 08:50 pm, Cap Petschulat wrote:
> I wanted to familiarize myself with Trac, so I pulled an unassigned
> ticket off the list and wrote up a patch.

Hi Cap, welcome to the project. :)

> Is this generally a safe way to contribute?

Absolutely. Posting to the list or simply attaching a diff to the associated
ticket is a great way of contributing patches.

> The patch adds a new function to util.py, wiki_escape_newline, which
> replaces line breaks with explicit line breaks. This method is then
> called on the svn message in most places it is displayed.

Looks like it does a-right-thing to me, many thanks for the patch.
I've attached the patch to ticket #352, for merging.

> I'm not sure what is the right thing to do for the RSS feed, so I left
> Log.log_receiver.item['log.raw'] alone. I thought that maybe basic html
> <br/> tags might be acceptable, but they didn't validate.

ASFAIK, html is a no-no in RSS (?). Admittedly, I'm not that closely familiar
with the RSS|RDF standards, so if anyone has a good idea on RSS feed
improvements, please let me know. Suggestions are very welcome.

Again, thanks for your participation.

--
Daniel Lundin | Edgewall Software
daniel@edgewall.com | Professional Linux & Open Source Consulting
| http://www.edgewall.com/