From 59863b7f7eaec333b5c273b64cf19cc9b0d8153f Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Wed, 22 Sep 2010 14:15:03 +0200
Subject: [PATCH] Fixed: Custom fields (lists) havent been correctly selected (bug_update) when content was containing html special chars

---
 core/cfdefs/cfdef_standard.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/cfdefs/cfdef_standard.php b/core/cfdefs/cfdef_standard.php
index 5754592..34a2c62 100644
--- a/core/cfdefs/cfdef_standard.php
+++ b/core/cfdefs/cfdef_standard.php
@@ -247,7 +247,7 @@ function cfdef_input_list($p_field_def, $t_custom_field_value) {
 
 	$t_selected_values = explode( '|', $t_custom_field_value );
 	foreach( $t_values as $t_option ) {
-		if( in_array( $t_option, $t_selected_values, true ) ) {
+		if ( in_array( string_attribute ( $t_option ), $t_selected_values, true ) ) {
 			echo '<option value="' . string_attribute( $t_option ) . '" selected="selected"> ' . string_display_line( $t_option ) . '</option>';
 		} else {
 			echo '<option value="' . string_attribute( $t_option ) . '">' . string_display_line( $t_option ) . '</option>';
-- 
1.7.0.2.msysgit.0

