Index: jrst/src/java/org/codelutin/jrst/HtmlGenerator.java
diff -u jrst/src/java/org/codelutin/jrst/HtmlGenerator.java:1.13 jrst/src/java/org/codelutin/jrst/HtmlGenerator.java:1.14
--- jrst/src/java/org/codelutin/jrst/HtmlGenerator.java:1.13 Fri Sep 17 13:59:07 2004
+++ jrst/src/java/org/codelutin/jrst/HtmlGenerator.java Mon Oct 25 14:04:43 2004
@@ -23,9 +23,9 @@
*
* @author Benjamin Poussin
* Copyright Code Lutin
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*
- * Mise a jour: $Date: 2004/09/17 13:59:07 $
+ * Mise a jour: $Date: 2004/10/25 14:04:43 $
* par : $Author: bpoussin $
*/
@@ -464,7 +464,11 @@
/** Modificateur de String **/
public String getHtmlName(String text) {
- return text.toLowerCase().trim().replace(' ','-');
+ if(text == null){
+ return "null";
+ }else{
+ return text.toLowerCase().trim().replace(' ','-');
+ }
}
/**
@@ -478,6 +482,9 @@
* Permet de convertir les caratere speciaux HTML du texte
*/
protected String encode(String s){
+ if(s == null){
+ return "";
+ }
s = s.replaceAll("&", "&"); // first all the time
s = s.replaceAll("<", "<");
s = s.replaceAll(">", ">");