Changeset 24928

Show
Ignore:
Timestamp:
10.01.2012 11:18:44 (8 years ago)
Author:
sjm84
Message:

Added in a function to escape newlines with backslashes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java

    r24450 r24928  
    415415        } 
    416416    } 
     417     
     418    public static String escapeNewLines(String str) 
     419    { 
     420        if(str == null || str.length() < 1) 
     421        { 
     422            return null; 
     423        } 
     424        return str.replace("\n", "\\\n"); 
     425    } 
    417426}