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
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
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 #