primefaces: SelectOneMenu: itemEscaped doesn't work anymore for selected items
1) Environment
PrimeFaces version: 11.0.7. ELITE Application server + version: Tomcat 9.0.45 Affected browsers: Chrome, Firefox, …
2) Expected behavior
A selected selectItem with reseverd HTML chars should be displayed, formatted, not escaped.
3) Actual behavior
Some reseverd HTML characters of a selected selectItem are shown escaped. - Regardless of selectitems ‘escape’ property settigns.

4) Steps to reproduce
Use attached testcase / webapp “pf11quot.zip” (or following xhtml page) and select Items with up / down arrows…
5) Sample XHTML
<?xml version = "1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>PrimeFaces Test</title>
</h:head>
<h:body>
<h:form id="contentForm">
<p:selectOneMenu>
<f:selectItem itemLabel="> greater fails" />
<f:selectItem itemLabel="> although escape = false" escape="false"/>
<f:selectItem itemLabel="< less fails" />
<f:selectItem itemLabel="& Ampersand fails" />
<f:selectItem itemLabel=""Quoting works"" />
</p:selectOneMenu>
</h:form>
</h:body>
</html>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- #9184 SelectOneMenu: itemEscaped works! — committed to christophs78/primefaces by christophs78 2 years ago
- #9184 SelectOneMenu: itemEscaped works! (#9193) — committed to primefaces/primefaces by christophs78 2 years ago
We have an integrationtest for something very similar:
https://github.com/primefaces/primefaces/blob/master/primefaces-integration-tests/src/main/java/org/primefaces/integrationtests/selectonemenu/SelectOneMenu002.java, https://github.com/primefaces/primefaces/blob/master/primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/selectonemenu/SelectOneMenu002Test.java
At least it’s not totally broken.