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
soni rajputsoni rajput 

Problem with HTML Text box in VF Page



I am developing an app to launch on appexchange. There is a visual force page in my app

which is displaying a text box using this tag :- <input type="text" value="{!VenueName}" /> 


So for security review should i use some HTMLEncode or JSEncode method ?





If you use a "natural" HTML element, you must remember to escape it (HTMLENCODE). If you use a "apex:inputText" (or the other related apex:input* fields), the value is automatically escaped for you. In other words, you should use "apex:inputText" instead (also, you can NOT read the value of a normal "input" field in Apex Code).