If you pass ESC_RAW as an escaping method and the value being requested is a non-scalar, instead of getting back the actual raw value you get the object decorated in such a way that values obtained from it are "raw".
There are certain things you can do to (for example) a raw array that you can't do to it's decorated counterpart so the current implementation could lead to unintuitive behaviour.
I don't think it's ideal for sfOutputEscaper to know about 'esc_raw', but I don't know there is any (pragmatic) way of doing this.
Index: lib/view/escaper/sfOutputEscaper.class.php
===================================================================
--- lib/view/escaper/sfOutputEscaper.class.php (revision 1428)
+++ lib/view/escaper/sfOutputEscaper.class.php (working copy)
@@ -74,7 +74,7 @@
*/
public static function escape($escapingMethod, $value)
{
- if (is_null($value) || ($value === false))
+ if (is_null($value) || ($value === false) || ($escapingMethod === 'esc_raw'))
{
return $value;
}