Changeset 24716
- Timestamp:
- 12/01/09 21:08:52 (4 years ago)
- Files:
-
- components/yaml/branches/1.0/lib/sfYamlInline.php (modified) (1 diff)
- components/yaml/trunk/lib/sfYamlInline.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
components/yaml/branches/1.0/lib/sfYamlInline.php
r24656 r24716 88 88 case is_numeric($value): 89 89 return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value); 90 case false !== strpos($value, "\n") :90 case false !== strpos($value, "\n") || false !== strpos($value, "\r"): 91 91 return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value)); 92 92 case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \#] | \A[ - ? | < > = ! % @ ]/x', $value): components/yaml/trunk/lib/sfYamlInline.php
r24656 r24716 88 88 case is_numeric($value): 89 89 return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value); 90 case false !== strpos($value, "\n") :90 case false !== strpos($value, "\n") || false !== strpos($value, "\r"): 91 91 return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value)); 92 92 case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \#] | \A[ - ? | < > = ! % @ ]/x', $value):