Afficher un message
Vieux 15/04/2008, 13h06   #4
Chris Morris
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make HTML code show up on the web

Bob <lindsay.robert@gmail.com> writes:
> On Apr 15, 4:32 am, Harlan Messinger
> <hmessinger.removet...@comcast.net> wrote:
> > [escape the HTML]

>
> I know, but I hate that. I wanted to try something different.


How do you deal with displaying </textarea> in HTML code with this
method?

Why do you hate escaping < as &lt; - if it's because it's a pain to
write every time, then use a method for generating the HTML code that
does it automatically.

Escaping also has the advantage that you can do more with the
displayed code. Example:

<p>An image is displayed with &lt;img src="<var>url</var>"
alt="<var>alternative text</var>" <span class="optional">width="<var>w</var>"
height="<var>h</var>"</span>&gt;.</p>

(While not at all necessary, I've also escaped > to &gt; in the
displayed code to make it slightly clearer)

--
Chris
  Réponse avec citation
 
Page generated in 0,05794 seconds with 9 queries