function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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