+ Start a Discussion
dke01dke01 

Escape double quotes

I am using a reqular HTML input textbox.  (I do not want to use an apex:inputfield)

 

My code is like this:  <input type="text"value="{!object.field}" />

 

However if field has a double quote in it  instead of generating       <input type="text"value="somevalue " foo" />

 

It generates  <input type="text"value="somevalue" foo="" />    in Firefox

 

Howcan I escape/replace  "  so that the HTML element is rendered with the correct value.

 

Best Answer chosen by Admin (Salesforce Developers) 
dke01dke01

In the end I had to call JSENCODE to do what i wanted.

All Answers

RyanGuestRyanGuest

Use &quot; instead of "

dke01dke01

In the end I had to call JSENCODE to do what i wanted.

This was selected as the best answer