www.webdeveloper.com
Results 1 to 3 of 3

Thread: Render html syntax as normal text

  1. #1
    Join Date
    Nov 2005
    Posts
    51

    Render html syntax as normal text

    Hi all,

    I have a block of html syntax that I am trying to render as normal text on my webpage. I have tried using <pre> and <code> but that does not work. Is there anything else I can do so I dont need to escape all my html characters?

    Here's the example I want to be able to read as regular text on my page:

    <pre>
    ...
    <span jwcid="@For" source="ognl:getResourceList()" value="ognl:curResource" converter="ognl:resourceConverter">
    ...
    </span>
    ...
    </pre>

    The three dots ... display properly but my span tags are still being rendered as html tags?

    Thanks

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    You need to convert the symbols to characters:
    Code:
    &lt;span jwcid=&quot;@For&quot; source=&quot;ognl:getResourceList()&quot; value=&quot;ognl:curResource&quot; 
    converter=&quot;ognl:resourceConverter&quot;&gt;

  3. #3
    Join Date
    May 2005
    Location
    Northern Indiana
    Posts
    597
    Try replacing the "<" and ">" in your span tags with "&lt;" & "&gt;" respectively

    EDIT: damn... KDLA beat me to it

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles