List Info

Thread: stripLineTerminators




stripLineTerminators
user name
2006-02-27 03:23:36
in BlojsomUtils:

     public static String stripLineTerminators(String input)
{
         if (input == null) {
             return null;
         }

         return input.replaceAll("[\n\r\f]",
"");
     }

isn't better to replace the line terminators with a space?

I realized it playing with autodiscovery trackback plugin.
Suppose to have an entry that starts with:
pippo
pluto

When the TrackbackPlugin recieves the ping, it applies this
method on 
the excerpt (line 379), and so the excerpt becomes
pippopluto that is ugly.
The only occurences of this method are in TrackbackPlugin,
line 379 and 
line 386, so I think that there won't be side effects after
having 
changed it.

Best regards.
-- 
Nicola Piccinini -- http://superfluo.org


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Blojsom-developers mailing list
Blojsom-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bloj
som-developers
stripLineTerminators
user name
2006-02-27 16:47:23
I added another method in BlojsomUtils.java.

 public static String stripLineTerminators(String input,
String replacement)

I changed the TrackbackPlugin to use a space as the
replacement.

On 2/26/06 10:23 PM, "Nicola Piccinini"
<picsuperfluo.org> wrote:

> 
> in BlojsomUtils:
> 
>      public static String stripLineTerminators(String
input) {
>          if (input == null) {
>              return null;
>          }
> 
>          return
input.replaceAll("[\n\r\f]", "");
>      }
> 
> isn't better to replace the line terminators with a
space?
> 
> I realized it playing with autodiscovery trackback
plugin.
> Suppose to have an entry that starts with:
> pippo
> pluto
> 
> When the TrackbackPlugin recieves the ping, it applies
this method on
> the excerpt (line 379), and so the excerpt becomes
pippopluto that is ugly.
> The only occurences of this method are in
TrackbackPlugin, line 379 and
> line 386, so I think that there won't be side effects
after having
> changed it.
> 
> Best regards.

-- 
David Czarnecki

http://www.blojsom.com/b
log/ | http://blojsom.sf.net




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Blojsom-developers mailing list
Blojsom-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bloj
som-developers
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )