* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
$data = $this->getResult()->getResultData( null, $transform );
$json = FormatJson::encode( $data, $this->getIsHtml(), $opt );
$data = $this->getResult()->getResultData( null, $transform );
$json = FormatJson::encode( $data, $this->getIsHtml(), $opt );
// Flash, but what it does isn't friendly for the API, so we need to
// work around it.
if ( preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $json ) ) {
// Flash, but what it does isn't friendly for the API, so we need to
// work around it.
if ( preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $json ) ) {
if ( isset( $params['callback'] ) ) {
$callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] );
# Prepend a comment to try to avoid attacks against content
if ( isset( $params['callback'] ) ) {
$callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] );
# Prepend a comment to try to avoid attacks against content