Internal function to escape a string into DOT safe syntax
@ignore
protected function escape($input) {
if (preg_match('/^([a-z_][a-z_0-9]*|-?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?))$/i', $input)) {
return $input;
}
else {
return '"' . str_replace(array(
"\r\n",
"\n",
"\r",
'"',
), array(
'\\n',
'\\n',
'\\n',
'\\"',
), $input) . '"';
}
}