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

StackOverflow https://stackoverflow.com//questions/24045634

  •  21-12-2019
  •  | 
  •  

Question

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

Was it helpful?

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top