﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
6394	Leading and trailing white space in values of custom fields should not be trimmed	aercolino	markjaquith	"Custom fields that begin or end with white space in their key or value are trimmed. 

I can undestand that a key is more easily dealt with if it is trimmed before saving it into the database. But values should definitely retain all their white space AS IS.

'''Suggested Fix'''

http://trac.wordpress.org/browser/trunk/wp-includes/functions.php#L405 (7508)
{{{
function maybe_serialize($data, $trim = true) { //was maybe_serialize($data)
}}}

http://trac.wordpress.org/browser/trunk/wp-includes/functions.php#L406 (7508)
{{{
if ( $trim && is_string($data) ) //was if ( is_string( $data ) )
}}}

http://trac.wordpress.org/browser/trunk/wp-admin/includes/post.php#L365 (7458)
{{{
$metavalue = maybe_serialize( stripslashes( ( $_POST['metavalue'] ) ), false ); //was $metavalue = maybe_serialize( stripslashes( (trim( $_POST['metavalue'] ) ) ));
}}}

http://trac.wordpress.org/browser/trunk/wp-admin/includes/post.php#L449 (7458)
{{{
$mvalue = maybe_serialize( stripslashes( $mvalue ), false ); //was $mvalue = maybe_serialize( stripslashes( $mvalue ));
}}}




----

[http://noteslog.com/post/wordpress-rendering-troubles/ WordPress Rendering Troubles]"	defect (bug)	closed	normal		Administration		normal	duplicate	meta value, custom field	
