Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

how to display "<"'s in html

  • 29-04-2003 9:55am
    #1
    Closed Accounts Posts: 10


    I have a javascript populating a table with text from a database. Some of the text strings have the symbols < and > in them and consequently do not display in a browser. eg the string below, "hello world<Paddy>" displays as just "hello world". Does the browser interpret Paddy as an invalid html tag and just ignores it?

    How can I display the brackets?

    <td>hello world <Paddy></td>


Comments

  • Registered Users, Registered Users 2 Posts: 1,186 ✭✭✭davej


    Use the <pre> </pre> tags around anything you want as a literal.

    davej


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    hello world &lt;Paddy&gt;
    
    HTML Special Entities

    adam


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    if you are using aps
    u could use server.htmlencode(text)
    which would do it for you


Advertisement