20030509 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

Comments:

I'm pretty sure that is fixed in the 097 branch and will be in 0.9.7.2 (this weekend).

Posted by Dave Johnson on May 09, 2003 at 11:31 AM MDT #

Cool! Are you going to integrate twisty comments into that branch?

Posted by Matt Raible on May 09, 2003 at 11:58 AM MDT #

I had the same problem, and now I have the tip check this url: http://www.jroller.com/page/jigi/20050601#jroller_comment_formatting Hope this helps :-) Regards. Luigi

Posted by Luigi R. Viggiano on June 01, 2005 at 09:33 AM MDT #

???????, ???? ??MP3 ????. http://seo-vip.com/cn.php

Posted by sdf on September 25, 2006 at 02:43 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
« January 2009
SunMonTueWedThuFriSat
    
1
2
3
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Recent Entries

Tag Cloud