tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Williams" <ccwillia...@ntlworld.com>
Subject Re: HTML quoting
Date Fri, 03 Oct 2003 17:19:11 GMT
>
> It is obvious then that a space would be &#032; or &#x20; since 32 is
> the ascii code for a space. Though i cannot quite figure out why you
> would want to escape a space...
>

I escape spaces and character entities in form fields; if you do the
following:
    <input name="x" size=20 maxlength=20 value="<%= someVal %>">
and someVal contains space characters (or worse, '>'), it won't display
properly.  If you escape the spaces, it will, and this is what I use the
method for.

If I'm emitting HTML where I know what it will be beforehand, I simply
include any appropriate character entities in my resource strings.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message