SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot sappo's Avatar
    Join Date
    Sep 2005
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    </textarea> inside <textarea>

    I have a <textarea> box that display code and one of the lines of code I need to display is </textarea>. Of-cause when the page renders the </textarea> that is contained, and should only display as text, ends the first <textarea>. This break EVERYTHING!

    Ok quick example:
    My code:

    <textarea>
    <form>
    <textarea></textarea>
    </form>
    </textarea>

    And should display like:

    <form>
    <textarea></textarea>
    </form>

    But display baddly like:

    <form>
    <textarea>

    With many errors.

    Does anyone know of a way to make things render only as text?
    Check out my Movie Trailers website - Popcorn Trailers

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    yes, replace < with &lt; and replace > with &gt;
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot sappo's Avatar
    Join Date
    Sep 2005
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But that won't work because you need to be able to edit and save and that just converts &lt; to < and &gt; to >. So the next time it won't work again.

    Is there another way? Or should I look at replacing all < > with &lt; and &gt; when you save?
    Check out my Movie Trailers website - Popcorn Trailers

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    sorry, yes, that's what i meant, when you save
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Zealot sappo's Avatar
    Join Date
    Sep 2005
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice one, cheers
    Check out my Movie Trailers website - Popcorn Trailers


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •