Friday May 09, 2003
Formatting Comments Correctly You can see from Matt's comments on my last post that my handy-dandy comments feature is not formatting comments correctly. Basically, if you put a line break in the textarea below (by pressing return), there should be a line break (<br />) in the rendered comment. The reason this is broken seems to be because the following Velocity code doesn't seem to be functioning correctly:
#set($content = $comment.content)
#if($escapeHtml)
#set($content = $utilities.escapeHTML($content))
#end
#if($autoformat)
#set($content = $stringUtils.replace($content,"\n","<br />"))
#end
You'll notice that it's not working on my in-page comments either. But it is working for the pop-up comments. However, the pop-up one is doing the StringUtils.replace in Java code, rather than Velocity. Hopefully someone will have a tip for me to fix this. Posted in Roller at May 09 2003, 08:13:38 AM MDT 4 Comments
Search This Site
Recent Entries
- Happy Birthday Mom!
- 2008 - A Year in Review
- Portland Tech Meetup Tomorrow Night
- My "almost slept in a snow cave" Adventure with Clint Foster
- My Christmas Travel Adventure
- AppFuse Light converted to Maven modules, upgraded to Tapestry 5 and Stripes 1.5
- Dojo/Comet support in Java Web Frameworks
- Abbie is a Blue Skier!
- How I recovered data from my failed Linux box
- Costa Rica was Awesome!
Posted by Dave Johnson on May 09, 2003 at 11:31 AM MDT #
Posted by Matt Raible on May 09, 2003 at 11:58 AM MDT #
Posted by Luigi R. Viggiano on June 01, 2005 at 09:33 AM MDT #
Posted by sdf on September 25, 2006 at 02:43 PM MDT #