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 by Dave Johnson on May 09, 2003 at 05:31 PM MDT #
Posted by Matt Raible on May 09, 2003 at 05:58 PM MDT #
Posted by Luigi R. Viggiano on June 01, 2005 at 03:33 PM MDT #
Posted by sdf on September 25, 2006 at 08:43 PM MDT #