Html escape text

Discussion in 'ASP .Net' started by Lloyd Dupont, Jan 10, 2006.

  1. Lloyd Dupont

    Lloyd Dupont Guest

    I have some text coming in a text box from the user and I would like to
    "Html Escape" it.

    That is: if the user wrote: "<name=xx/>" I would like to transform it into
    "&lt;name=xx/&gt;"
    I know there is a function for it, I just can't remember which... going to
    look in the doc, but though I could ask here first!

    --
    I have taken a vow of poverty. If you want to really piss me off, send me
    money.
     
    Lloyd Dupont, Jan 10, 2006
    #1
    1. Advertising

  2. Lloyd Dupont

    Lloyd Dupont Guest

    found it!
    Page.Server.HtmlEncode(tTitle.Text)

    "Lloyd Dupont" <net.galador@ld> wrote in message
    news:...
    >I have some text coming in a text box from the user and I would like to
    >"Html Escape" it.
    >
    > That is: if the user wrote: "<name=xx/>" I would like to transform it into
    > "&lt;name=xx/&gt;"
    > I know there is a function for it, I just can't remember which... going to
    > look in the doc, but though I could ask here first!
    >
    > --
    > I have taken a vow of poverty. If you want to really piss me off, send me
    > money.
    >
    >
     
    Lloyd Dupont, Jan 10, 2006
    #2
    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. XML Escape Text?

    , Mar 30, 2006, in forum: Java
    Replies:
    1
    Views:
    6,466
  2. Replies:
    7
    Views:
    11,751
    Julian Reschke
    Jan 24, 2004
  3. harrelson
    Replies:
    3
    Views:
    3,957
    Craig Ringer
    Dec 10, 2004
  4. Will McGugan

    html escape sequences

    Will McGugan, Mar 18, 2005, in forum: Python
    Replies:
    2
    Views:
    482
    Will McGugan
    Mar 18, 2005
  5. slomo
    Replies:
    5
    Views:
    1,603
    Duncan Booth
    Dec 2, 2007
Loading...

Share This Page