Re: How not to parse HTML??
- From: "Karl R. B. Jones" <karl-jones@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 10 Apr 2005 22:07:07 +0100
I am creating the page using DHTML and JavaScript.
The page displays data taken from the object model of another application.
Some of this data may contain HTML tags. I need to ignore them.
"Leonhardt Wille" <lwille@xxxxxxxxxx> wrote in message
news:O%23dz%23rgPFHA.4052@xxxxxxxxxxxxxxxxxxxxxxx
> How is the page generated? Do you use PHP for generation? You could just
> call htmlentities (http://de.php.net/manual/en/function.htmlentities.php).
> That's it. If you are using another language, just replace "<" and ">"
> with their HTML equivalents.
>
> Karl R. B. Jones wrote:
>> Hi Leo,
>>
>> I am creating the HTML page dynamically, and don't know in advance what
>> the string will be.
>> I cannot format it in advance. It may contain anything.
>> I need to tell the parser to display it as it is without responding to
>> any tags it may contain.
>>
>> Thanks
>> Karl
>>
>> "Leonhardt Wille" <lwille@xxxxxxxxxx> wrote in message
>> news:eAD0UffPFHA.2956@xxxxxxxxxxxxxxxxxxxxxxx
>>
>>>1. Where do you want to display a string
>>>2. The string may contain HTML, but you don't want it to be parsed? You
>>>have to mask HTML characters like this:
>>>Replace < with < ("lower than")
>>>Replace > with > ("greater than")
>>>Replace " with " ("Quote")
>>>3. I'm having problems understanding your English
>>>
>>>regards Leo
>>>
>>>Karl R. B. Jones wrote:
>>>
>>>>Hi,
>>>>
>>>>Could someone tell me how to display a string without risking any HTML
>>>>that string contains being parsed.
>>>>I want to show text that may contain HTML.
>>>>
>>>>Thanks
>>>>Karl
>>
>>
.
- References:
- How not to parse HTML??
- From: Karl R. B. Jones
- Re: How not to parse HTML??
- From: Leonhardt Wille
- Re: How not to parse HTML??
- From: Karl R. B. Jones
- Re: How not to parse HTML??
- From: Leonhardt Wille
- How not to parse HTML??
- Prev by Date: Re: How not to parse HTML??
- Next by Date: Re: How not to parse HTML??
- Previous by thread: Re: How not to parse HTML??
- Next by thread: Re: How not to parse HTML??
- Index(es):
Relevant Pages
|
Loading