i modify the code, and now it's ok.

        public static String escapeMarkup(final String s, final boolean 
escapeSpaces)
        {
                if (s == null)
                {
                        return null;
                }
                else
                {
                        final StringBuffer buffer = new StringBuffer();

                        for (int i = 0; i < s.length(); i++)
                        {
                                final char c = s.charAt(i);

                                switch (c)
                                {
                                        case '\t' :
                                                if (escapeSpaces)
                                                {
                                                        // Assumption is four 
space tabs (sorry, but that's
                                                        // just
                                                        // how it is!)
                                                        
buffer.append("&nbsp;&nbsp;&nbsp;&nbsp;");
                                                }
                                                else
                                                {
                                                        buffer.append(c);
                                                }
                                                break;

                                        case ' ' :
                                                if (escapeSpaces)
                                                {
                                                        buffer.append("&nbsp;");
                                                }
                                                else
                                                {
                                                        buffer.append(c);
                                                }
                                                break;

                                        case '<' :
                                                buffer.append("&lt;");
                                                break;

                                        case '>' :
                                                buffer.append("&gt;");
                                                break;
                                        case '&':
                                            buffer.append("&amp;");
                                            break;
                                        case '"':
                                            buffer.append("&quot;");
                                            break;
                                        case '\'':
                                            buffer.append("&#039;");
                                            break;
                                        default :
                                                buffer.append(c);
                                                break;
                                }
                        }

                        return buffer.toString();
                }
        }



======= 2005-05-17 14:17:55 您在来信中写道:=======

> how can i contribute to wicket? My english is poor...
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
>_______________________________________________
>Wicket-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/wicket-user

= = = = = = = = = = = = = = = = = = = =
                        

        致
礼!
 
                                 
        叶卫国
[EMAIL PROTECTED]
          2005-05-17

N?S^甸?X??????%y*Zq浒y?旦?Ф?z?~*於???庄zZ)z抚??I?硅龙+???y*Zq浒y?旦?m???vw(??

Reply via email to