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. image

4) Steps to reproduce

Use attached testcase / webapp “pf11quot.zip” (or following xhtml page) and select Items with up / down arrows…

pf11quot.zip

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="&gt; greater fails" />
				<f:selectItem itemLabel="&gt; although escape = false"  escape="false"/>
				<f:selectItem itemLabel="&lt; less fails" />
				<f:selectItem itemLabel="&amp; Ampersand fails" />
				<f:selectItem itemLabel="&quot;Quoting works&quot;" />
			</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

Most upvoted comments