Make HTML code show up on the web

Discussion in 'HTML' started by Bob, Apr 15, 2008.

  1. Bob

    Bob Guest

    Bob, Apr 15, 2008
    #1
    1. Advertising

  2. Bob

    Bergamot Guest

    Bergamot, Apr 15, 2008
    #2
    1. Advertising

  3. Harlan Messinger, Apr 15, 2008
    #3
  4. On 2008-04-15, Bob wrote:
    > http://robertlindsay.blogspot.com/2008/04/how-to-make-html-code-show-up-on.html
    >
    > I think I solved it. Please feel free to read and critique the
    > solution.


    That's a lot of trouble for something simple.

    As someone else already pointed out, you can just change (using a
    tool such as sed) '<' to '&lt;' and '&' to '&amp;'.

    Alternatively, you can rename the file from file.html to file.txt
    (or make a link from one name to the other).

    --
    Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
     
    Chris F.A. Johnson, Apr 15, 2008
    #4
  5. Scripsit Chris F.A. Johnson:

    > Alternatively, you can rename the file from file.html to file.txt


    That might not help in all cases.

    First, the file name suffix has no magic in itself. It's the HTTP
    headers that specify whether a resource is to be treated as HTML, as
    plain text, or as something else. On the other hand, using ".txt"
    _usually_ makes the server send a header that tells that the resource is
    plain text.

    Second, IE has been observed to ignore the HTTP header and treat data as
    HTML, if IE "thinks" that it "looks like" HTML. This is all wrong, but
    what can you do?

    And does it matter? Anyone who can possibly benefit from seeing HTML
    markup probably knows how to do View Source. On the other hand, HTML
    markup written by someone who does odd tricks to do a simple thing and
    multiposts advice on it is hardly worth copying or imitating.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 16, 2008
    #5
  6. Bob

    Bob Guest

    On Apr 16, 12:22 am, "Jukka K. Korpela" <> wrote:
    > Scripsit Chris F.A. Johnson:
    >
    > > Alternatively, you can rename the file from file.html to file.txt

    >
    > That might not help in all cases.
    >
    > First, the file name suffix has no magic in itself. It's the HTTP
    > headers that specify whether a resource is to be treated as HTML, as
    > plain text, or as something else. On the other hand, using ".txt"
    > _usually_ makes the server send a header that tells that the resource is
    > plain text.
    >
    > Second, IE has been observed to ignore the HTTP header and treat data as
    > HTML, if IE "thinks" that it "looks like" HTML. This is all wrong, but
    > what can you do?
    >
    > And does it matter? Anyone who can possibly benefit from seeing HTML
    > markup probably knows how to do View Source. On the other hand, HTML
    > markup written by someone who does odd tricks to do a simple thing and
    > multiposts advice on it is hardly worth copying or imitating.
    >
    > --
    > Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/


    I h
     
    Bob, Apr 16, 2008
    #6
  7. Bob

    Bob Guest

    On Apr 16, 12:22 am, "Jukka K. Korpela" <> wrote:
    > Scripsit Chris F.A. Johnson:
    >
    > > Alternatively, you can rename the file from file.html to file.txt

    >
    > That might not help in all cases.
    >
    > First, the file name suffix has no magic in itself. It's the HTTP
    > headers that specify whether a resource is to be treated as HTML, as
    > plain text, or as something else. On the other hand, using ".txt"
    > _usually_ makes the server send a header that tells that the resource is
    > plain text.
    >
    > Second, IE has been observed to ignore the HTTP header and treat data as
    > HTML, if IE "thinks" that it "looks like" HTML. This is all wrong, but
    > what can you do?
    >
    > And does it matter? Anyone who can possibly benefit from seeing HTML
    > markup probably knows how to do View Source. On the other hand, HTML
    > markup written by someone who does odd tricks to do a simple thing and
    > multiposts advice on it is hardly worth copying or imitating.
    >
    > --
    > Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/


    I have to multipost. I don't have a newsreader and I got rid of my
    news account. I post from Google groups so there is no way to cross
    post, unless I have not figured it out yet.
     
    Bob, Apr 16, 2008
    #7
  8. Bob

    Els Guest

    Bob wrote:

    > I have to multipost. I don't have a newsreader and I got rid of my
    > news account. I post from Google groups so there is no way to cross
    > post, unless I have not figured it out yet.


    In my Google Groups 'new post' form, I see a field "To Newsgroups". My
    guess is that that is meant to be plural. Especially since right below
    that file there's a sentence saying "(Separate multiple groups with
    commas)".

    --
    Els http://locusmeus.com/
     
    Els, Apr 16, 2008
    #8
  9. Scripsit Bob:

    > I have to multipost.


    Thank you for the clarification. Now we know that we need to kill-
    file you.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 16, 2008
    #9
  10. Bob wrote:
    ....
    > I have to multipost. I don't have a newsreader and I got rid of my
    > news account. I post from Google groups so there is no way to cross
    > post, unless I have not figured it out yet.


    You just type in the other newsgroups in the "Newsgroups" field,
    separated by commas.

    Nick

    --
    Nick Theodorakis

    contact form:
    http://theodorakis.net/contact.html
     
    Nick Theodorakis, Apr 17, 2008
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt

    TO show or NOT to show

    Matt, May 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    404
  2. =?Utf-8?B?QW5kcmV3?=

    How to make a web user control show on the top?

    =?Utf-8?B?QW5kcmV3?=, Jan 18, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    771
    =?Utf-8?B?TXJzTGVpZ2g=?=
    Feb 21, 2006
  3. david wolf
    Replies:
    1
    Views:
    595
    Oliver Wong
    Apr 21, 2006
  4. Lloyd Sheen
    Replies:
    3
    Views:
    290
    Cowboy \(Gregory A. Beamer\)
    Mar 18, 2008
  5. Guest
    Replies:
    2
    Views:
    115
    Brian McCauley
    Aug 13, 2006
Loading...

Share This Page