From ecf344ec938fd38f11529f2429a608327ceeabb6 Mon Sep 17 00:00:00 2001
From: Susanne Moog <typo3@susannemoog.de>
Date: Fri, 30 Apr 2010 16:31:45 +0000
Subject: [PATCH] Fixed bug #14179: TCA select doesn't show record titles whic
 start with <=

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7465 709f56b5-9817-0410-a4d7-c38de5d9e867
---
 ChangeLog                      |  1 +
 t3lib/class.t3lib_tceforms.php | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dc1d6618588c..a266d5404ba5 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
 
 	* Fixed bug #14079: Running the unit tests floods the deprecation log (thanks to Oliver Klee)
 	* Fixed bug #11811: Raise versions and states of sysexts (stable <-> 1.0.0) (thanks to Steffen Gebert)
+	* Fixed bug #14179: TCA select doesn't show record titles whic start with <= (thanks to Georg Ringer)
 
 2010-04-30  Steffen Kamper  <info@sk-typo3.de>
 
diff --git a/t3lib/class.t3lib_tceforms.php b/t3lib/class.t3lib_tceforms.php
index 97629fd971ae..205b0b280a47 100644
--- a/t3lib/class.t3lib_tceforms.php
+++ b/t3lib/class.t3lib_tceforms.php
@@ -1645,7 +1645,7 @@ class t3lib_TCEforms	{
 					$opt[]= '<option value="'.htmlspecialchars($p[1]).'"'.
 							$sM.
 							($styleAttrValue ? ' style="'.htmlspecialchars($styleAttrValue).'"' : '').
-							'>'.t3lib_div::deHSCentities(htmlspecialchars($p[0])).'</option>' . LF;
+							'>' . t3lib_div::deHSCentities(($p[0])) . '</option>' . LF;
 				}
 			}
 
@@ -2027,7 +2027,7 @@ class t3lib_TCEforms	{
 			// Perform modification of the selected items array:
 		foreach($itemArray as $tk => $tv) {
 			$tvP = explode('|',$tv,2);
-			$evalValue = rawurldecode($tvP[0]);
+			$evalValue = $tvP[0];
 			$isRemoved = in_array($evalValue,$removeItems)  || ($config['form_type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode($table,$field,$evalValue,$config['authMode']));
 			if ($isRemoved && !$PA['fieldTSConfig']['disableNoMatchingValueElement'] && !$config['disableNoMatchingValueElement'])	{
 				$tvP[1] = rawurlencode(@sprintf($nMV_label, $evalValue));
@@ -2038,7 +2038,7 @@ class t3lib_TCEforms	{
 					// Case: flexform, default values supplied, no label provided (bug #9795)
 				foreach ($selItems as $selItem) {
 					if ($selItem[1] == $tvP[0]) {
-						$tvP[1] = $selItem[0];
+						$tvP[1] = html_entity_decode($selItem[0]);
 						break;
 					}
 				}
@@ -2057,7 +2057,7 @@ class t3lib_TCEforms	{
 				}
 				$opt[]= '<option value="'.htmlspecialchars($p[1]).'"'.
 								($styleAttrValue ? ' style="'.htmlspecialchars($styleAttrValue).'"' : '').
-								'>'.htmlspecialchars($p[0]).'</option>';
+								'>' . $p[0] . '</option>';
 			}
 
 				// Put together the selector box:
@@ -4703,8 +4703,8 @@ class t3lib_TCEforms	{
 
 					// Add the item:
 				$items[] = array(
-					$lPrefix.strip_tags(t3lib_BEfunc::getRecordTitle($f_table,$row)),
-					$uidPre.$row['uid'],
+					$lPrefix . htmlspecialchars(t3lib_BEfunc::getRecordTitle($f_table, $row)),
+					$uidPre . $row['uid'],
 					$icon
 				);
 			}
-- 
GitLab