I too would suspect magic quotes. There are no regular expressions within YAMS that would have that kind of effect that I know of and YAMS does not interfere with the process of saving a template.
Three ways to disable magic quotes that I know are:
1. Turn off the PHP magic quotes within the php.ini... but you probably don’t have access/permissions for that.
2. Turn off the PHP magic quotes using Apache config (.htaccess) as was mentioned previously:
# Disable Magic Quotes
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag magic_quotes_sybase Off
3. Remove the extra quotes added by PHP manually by executing the following PHP code before any $_POST, $_GET, $_COOKIE, or $_REQUEST variables are used.
// Disable magic quotes manually
if (get_magic_quotes_gpc())
{
if ( ! function_exists( 'stripslashes_deep' ) )
{
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
}
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
}
I’m not sure where the best place to put this would be... Sounds like a hack, but the best place would probably be to edit the MODx index.php and place it right at the top.
It might be worth disabling the YAMS and managermanager plugins one at a time to see if that effects the problem with the quotes too.
EDIT: By the way, it sounds like you are using a release candidate of MODx? It’s probably best to upgrade to the final release, just in case it is a bug that got fixed.