1 16 package org.apache.cocoon.components.serializers.encoding; 17 18 24 public class HTMLEncoder extends XHTMLEncoder { 25 26 private char APOSTROPHE[] = { '\'' }; 27 28 31 public HTMLEncoder() { 32 super("X-W3C-HTML"); 33 } 34 35 41 protected HTMLEncoder(String name) { 42 super(name); 43 } 44 45 49 protected boolean compile(char c) { 50 if (c == '\'') return(true); 51 return(super.compile(c)); 52 } 53 54 58 public char[] encode(char c) { 59 if (c == '\'') return(APOSTROPHE); 60 return (super.encode(c)); 61 } 62 } | Popular Tags |