I would like a select option to appear in the page like this:
User and 2 "Reports To" Levels
but have not figured out how to escape the double quotes in a Visualforce attribute such as:
<apex:selectOption itemValue="2" itemLabel="User and 2 "Reports To" Levels"/>
How do I do this (without resorting to using a single quote instead)?
Best Answer
This can be done using the
itemEscaped="false"
attribute on theapex:selectOption
tag. This will allow you to use HTML in the label text and render it into the page.In your case, you want to use
"
to produce the quote character in the label:User and 2 "Reports To" Levels
.