TaskList & Tasks textile formatting
Submitted by balder on Tue, 09/25/2007 - 12:57.
| Project: | ProjectPier |
| Version: | 0.8.5.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | andypost |
| Status: | patch - code needs review |
Description
When tasks are displayed, they lose formatting (paragraphs and line breaks). Oddly, if you click on the "edit" button you can see the text coreectly formatted.

Seriously. This was something Illija was strangely confident people wouldn't mind putting up with. I'm totally for making the formatting in tasks match the formatting elsewhere.
Right now tasks seems to be formatted using the clean() function which converts html characters like < into escapes like >
The Textile text should no longer display HTML entities literally like that. Also, there's been a suggestion about also adding automatic URL recognition in, which seems like a good idea (see http://projectpier.org/node/538).
Most of the time when I'm entering tasks, I want line breaks since tasks often aren't just one-liners. Clients entering information also use line breaks so I don't understand why tasks are not "supposed" to have formatting. I think any place you're asking for input using a textarea, proper output formatting should be implemented.
I think a simple, robust function to handle this is the "autop" function from Wordpress. It automatically inserts line breaks and converts double line breaks to paragraphs. It will also recognize block level html so it won't improperly wrap something in a paragraph.
More info can be found at Matt's page:
http://ma.tt/scripts/autop/
Here's a link to the Wordpress source code that contains the latest, most debugged version. It's the 3rd function down:
http://trac.wordpress.org/browser/trunk/wp-includes/formatting.php
The function is available for public use, so there shouldn't be a problem copying it verbatim in ProjectPier. A comment attribution can always be added.
Can you please provide an example of a task you are trying enter?
Textile formatting should now be working as expected as of r148.
Automatically closed -- issue fixed for two weeks with no activity.
I've reopen this with patch. Suppose textile is good enough to user it on tasks and last list description.
Idea from http://www.activecollab.com/forums/post/7019/#post7019
There's a change in css style 'desc' which is Italic style changed to 'taskListText' for better view!
style change can be replaced in theme task_list.css for
div.taskList .desc {....some theme-style
font-style:normal; /* add this */
}
so patch without css-rule change
PS all themes should be updated