|
Posted by Benjamin Niemann on November 17, 2005, 10:43 pm
Please log in for more thread options
s.chelliah@gmail.com wrote:
> The problem is that the text "<DALLAS>" is being interpreted as an HTML
> tag. We can circumvent this problem by pre-parsing the display string
> and replacing the "<" with "<", resulting in the proper display of
> the string.
>
> However, there is a very long list of standard HTML characters whose
> mnemonic and/or numeric representations are translated by HTML for
> display purposes.
one, two, many ;)
There are in fact only three characters that must be encoded: '<', '>' and
'&'. A pretty long list, I must admit...
> For example:
> If the user enters "ID-12¡" or "ID-12¡"
> the user expects the string to be displayed as "ID-12¡" or
> "ID-12¡", not "ID-12!" (where the "!" actually represents an
> inverted exclamation point).
It is sufficient to quote the '&' here:
User enters: "ID-12¡"
Inserted into HTML: "ID-12&iexcl;"
Displayed: "ID-12¡"
> We have tried to display the user's string with <PRE>string</PRE>,
> <CODE>string</CODE>, <BLOCKQUOTE>string</BLOCKQUOTE> and even the
> deprecated <LISTING>string</LISTING> to no avail. Even though our
> reference text
Time to look for a correct reference text.
> implies that the sequence of characters between <PRE>
> and </PRE> will not be interpreted by HTML, both of our browsers (MS
> and Netscape) do interpret the characters.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
|