Search code examples
coldfusioncfoutput

how to output something like <this is my word="word" value="#abcg#"> using cfoutput coldfusion


how to output something like using cfoutput tag.

     <cfoutput>
         <this is my word="word" value="#abcg#">
     </cfoutput>

this will gives me nothing when i use single-quote it will print it with single-quote like

     <cfoutput>
        <'this is my word="word" value="#abcg#"'>
     </cfoutput>

result is:

      <'this is my word="word" value="#abcg#"'>

how can i get just

    <this is my word="word" value="#abcg#">

thanks for the help


Solution

  • You can use the following to escape the browser trying to render it as an HTML tag

    <cfoutput>
        &lt;this is my word="word" value="#abcg#"&gt;
     </cfoutput>