本文整理汇总了PHP中escape_html函数的典型用法代码示例。如果您正苦于以下问题:PHP escape_html函数的具体用法?PHP escape_html怎么用?PHP escape_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了escape_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Standard modular run function for do_next_menu hooks. They find links to put on standard navigation menus of the system.
*
* @param boolean Whether to look deep into the database (or whatever else might be time-intensive) for links
* @return array Array of links and where to show
*/
function run($exhaustive = false)
{
if (!addon_installed('catalogues')) {
return array();
}
$ret = array();
if (has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_catalogues')) {
$ret[] = array('cms', 'catalogues', array('cms_catalogues', array('type' => 'misc'), get_module_zone('cms_catalogues')), do_lang_tempcode('ITEMS_HERE', do_lang_tempcode('CATALOGUES'), make_string_tempcode(escape_html(integer_format($GLOBALS['SITE_DB']->query_value_null_ok('catalogues', 'COUNT(*)', NULL, '', true))))), 'DOC_CATALOGUES');
}
if ($exhaustive) {
$catalogues = $GLOBALS['SITE_DB']->query_select('catalogues', array('c_name', 'c_title', 'c_description', 'c_ecommerce'), NULL, '', 10, NULL, true);
if (!is_null($catalogues)) {
$ret2 = array();
foreach ($catalogues as $row) {
if (substr($row['c_name'], 0, 1) == '_') {
continue;
}
if ($row['c_ecommerce'] == 0 || addon_installed('shopping')) {
if (has_submit_permission('mid', get_member(), get_ip_address(), 'cms_catalogues', array('catalogues_catalogue', $row['c_name']))) {
$ret2[] = array('cms', 'of_catalogues', array('cms_catalogues', array('type' => 'misc', 'catalogue_name' => $row['c_name']), get_module_zone('cms_catalogues')), do_lang_tempcode('ITEMS_HERE', escape_html(get_translated_text($row['c_title'])), escape_html(integer_format($GLOBALS['SITE_DB']->query_value_null_ok('catalogue_entries', 'COUNT(*)', array('c_name' => $row['c_name']), '', true)))), get_translated_text($row['c_description']));
}
}
}
if (count($ret2) < 10) {
$ret = array_merge($ret, $ret2);
}
}
}
return $ret;
}
示例2: run
/**
* Standard modular run function.
*
* @param array A map of parameters.
* @return tempcode The result of execution.
*/
function run($map)
{
require_lang('amazon');
if (!array_key_exists('associates_id', $map)) {
return do_lang_tempcode('NO_PARAMETER_SENT', 'associates_id');
}
if (!array_key_exists('product_line', $map)) {
return do_lang_tempcode('NO_PARAMETER_SENT', 'product_line');
}
if (!array_key_exists('subject_keywords', $map)) {
return do_lang_tempcode('NO_PARAMETER_SENT', 'subject_keywords');
}
if (!array_key_exists('items_number', $map)) {
return do_lang_tempcode('NO_PARAMETER_SENT', 'items_number');
}
$associates_id = $map['associates_id'];
//'we4u-20';//
$product_line = $map['product_line'];
$subject_keywords = preg_replace('#\\s#', '+', $map['subject_keywords']);
$n = isset($map['items_number']) && intval($map['items_number']) > 0 ? $map['items_number'] : 3;
$out = '';
for ($i = 0; $i < $n; $i++) {
$out .= '<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&t=' . escape_html($associates_id) . '&o=1&p=8&l=st1&mode=' . escape_html($product_line) . '&search=' . $subject_keywords . '&t1=_blank&lc1=00FFFF&bg1=FFFFFF&f=ifr" marginwidth="0" marginheight="0" width="120px" height="240" border="0" frameborder="0" style="width: 120px; border:none;" scrolling="no"></iframe><br /><br />';
}
return do_template('BLOCK_SIDE_AMAZON_AFFILIATES', array('TITLE' => do_lang_tempcode('BLOCK_AMAZON_AFFILIATE_SALES_TITLE'), 'CONTENT' => $out, 'ASSOCIATES_ID' => $associates_id, 'PRODUCT_LINE' => $product_line, 'SUBJECT_KEYWORDS' => $subject_keywords));
}
示例3: ocf_check_post
/**
* Check a post would be valid.
*
* @param LONG_TEXT The post.
* @param ?AUTO_LINK The ID of the topic the post would be in (NULL: don't check with regard to any particular topic).
* @param ?MEMBER The poster (NULL: current member).
* @return ?array Row of the existing post if a double post (single row map-element in a list of rows) (NULL: not a double post).
*/
function ocf_check_post($post, $topic_id = NULL, $poster = NULL)
{
if (is_null($poster)) {
$poster = get_member();
}
require_code('comcode_check');
check_comcode($post, NULL, false, NULL, true);
if (strlen($post) == 0) {
warn_exit(do_lang_tempcode('POST_TOO_SHORT'));
}
require_code('ocf_groups');
if (strlen($post) > ocf_get_member_best_group_property($poster, 'max_post_length_comcode')) {
warn_exit(make_string_tempcode(escape_html(do_lang('_POST_TOO_LONG'))));
}
if (!is_null($topic_id)) {
if (running_script('stress_test_loader')) {
return NULL;
}
// Check this isn't the same as the last post here
$last_posts = $GLOBALS['FORUM_DB']->query_select('f_posts', array('p_post', 'p_poster', 'p_ip_address'), array('p_topic_id' => $topic_id), 'ORDER BY p_time DESC,id DESC', 1);
if (array_key_exists(0, $last_posts)) {
if ($last_posts[0]['p_poster'] == $GLOBALS['OCF_DRIVER']->get_guest_id() && get_ip_address() != $last_posts[0]['p_ip_address']) {
$last_posts[0]['p_poster'] = -1;
}
if ($last_posts[0]['p_poster'] == $poster && get_translated_text($last_posts[0]['p_post'], $GLOBALS['FORUM_DB']) == $post && get_param_integer('keep_debug_notifications', 0) != 1) {
warn_exit(do_lang_tempcode('DOUBLE_POST_PREVENTED'));
}
}
return $last_posts;
}
return NULL;
}
示例4: render_tab
/**
* Standard modular render function for profile tabs edit hooks.
*
* @param MEMBER The ID of the member who is being viewed
* @param MEMBER The ID of the member who is doing the viewing
* @param boolean Whether to leave the tab contents NULL, if tis hook supports it, so that AJAX can load it later
* @return ?array A tuple: The tab title, the tab body text (may be blank), the tab fields, extra Javascript (may be blank) the suggested tab order, hidden fields (optional) (NULL: if $leave_to_ajax_if_possible was set)
*/
function render_tab($member_id_of, $member_id_viewing, $leave_to_ajax_if_possible = false)
{
$title = do_lang_tempcode('DELETE_MEMBER');
$order = 200;
// Actualiser
$delete_account = post_param_integer('delete', 0);
if ($delete_account == 1) {
if (is_guest($member_id_of)) {
warn_exit(do_lang_tempcode('INTERNAL_ERROR'));
}
ocf_delete_member($member_id_of);
inform_exit(do_lang_tempcode('SUCCESS'));
}
if ($leave_to_ajax_if_possible) {
return NULL;
}
// UI fields
$username = $GLOBALS['FORUM_DRIVER']->get_username($member_id_of);
$text = do_lang_tempcode('_DELETE_MEMBER' . ($member_id_of == get_member() ? '_SUICIDAL' : ''), escape_html($username));
$fields = new ocp_tempcode();
require_code('form_templates');
$fields->attach(form_input_tick(do_lang_tempcode('DELETE'), do_lang_tempcode('DESCRIPTION_DELETE'), 'delete', false));
$javascript = '';
return array($title, $fields, $text, $javascript, $order);
}
示例5: run
/**
* Standard modular run function.
*
* @param array A map of parameters.
* @return tempcode The result of execution.
*/
function run($map)
{
require_code('catalogues');
require_lang('catalogues');
require_css('catalogues');
$number = array_key_exists('param', $map) ? intval($map['param']) : 10;
$catalogue = array_key_exists('catalogue', $map) ? $map['catalogue'] : 'faqs';
$zone = array_key_exists('zone', $map) ? $map['zone'] : get_module_zone('catalogues');
$root = array_key_exists('root', $map) && $map['root'] != '' ? intval($map['root']) : NULL;
$catalogues = $GLOBALS['SITE_DB']->query_select('catalogues', array('*'), array('c_name' => $catalogue), '', 1);
if (!array_key_exists(0, $catalogues)) {
return do_lang_tempcode('MISSING_RESOURCE', escape_html($catalogue));
}
$catalogue_row = $catalogues[0];
$entries = $GLOBALS['SITE_DB']->query_select('catalogue_entries', array('*'), array('c_name' => $catalogue, 'ce_validated' => 1), 'ORDER BY ce_add_date DESC', $number);
$tpl_set = $catalogue;
$display_type = array_key_exists('display_type', $map) ? intval($map['display_type']) : NULL;
list($content, , ) = get_catalogue_category_entry_buildup(db_get_first_id(), $catalogue, $catalogue_row, 'SEARCH', $tpl_set, $number, 0, NULL, $root, $display_type, false, $entries);
$catalogue_title = get_translated_text($catalogue_row['c_title']);
if ($content->is_empty()) {
if (has_actual_page_access(NULL, 'cms_catalogues', NULL, NULL) && has_submit_permission('mid', get_member(), get_ip_address(), 'cms_catalogues')) {
$submit_url = build_url(array('page' => 'cms_catalogues', 'type' => 'add_entry', 'catalogue_name' => $catalogue, 'redirect' => SELF_REDIRECT), get_module_zone('cms_catalogues'));
} else {
$submit_url = new ocp_tempcode();
}
return do_template('BLOCK_NO_ENTRIES', array('HIGH' => false, 'TITLE' => do_lang_tempcode('RECENT', escape_html(integer_format($number)), escape_html($catalogue_title)), 'MESSAGE' => do_lang_tempcode('NO_ENTRIES'), 'ADD_NAME' => do_lang_tempcode('CATALOGUE_GENERIC_ADD', escape_html($catalogue_title)), 'SUBMIT_URL' => $submit_url));
}
return do_template('BLOCK_MAIN_RECENT_CC_ENTRIES', array('_GUID' => 'a57fa1b83d1b6fe3acbceb2b618e6d7f', 'CATALOGUE_TITLE' => $catalogue_title, 'CATALOGUE' => $catalogue, 'CONTENT' => $content, 'NUMBER' => integer_format($number)));
}
示例6: sitemaps_build
/**
* Top level function to (re)generate a Sitemap (xml file, Google-style).
*/
function sitemaps_build()
{
$GLOBALS['NO_QUERY_LIMIT'] = true;
$path = get_custom_file_base() . '/ocp_sitemap.xml';
if (!file_exists($path)) {
if (!is_writable_wrap(dirname($path))) {
warn_exit(do_lang_tempcode('WRITE_ERROR_CREATE', escape_html('/')));
}
} else {
if (!is_writable_wrap($path)) {
warn_exit(do_lang_tempcode('WRITE_ERROR', escape_html('ocp_sitemap.xml')));
}
}
// Runs via a callback mechanism, so we don't need to load an arbitrary complex structure into memory.
sitemaps_xml_initialise($path);
spawn_page_crawl('pagelink_to_sitemapsxml', $GLOBALS['FORUM_DRIVER']->get_guest_id(), NULL, DEPTH__ENTRIES);
sitemaps_xml_finished();
// Ping search engines
if (get_option('auto_submit_sitemap') == '1') {
$ping = true;
$base_url = get_base_url();
$not_local = substr($base_url, 0, 16) != 'http://localhost' && substr($base_url, 0, 16) != 'http://127.0.0.1' && substr($base_url, 0, 15) != 'http://192.168.' && substr($base_url, 0, 10) != 'http://10.';
if ($ping && get_option('site_closed') == '0' && $not_local) {
// Submit to search engines
$services = array('http://www.google.com/webmasters/tools/ping?sitemap=', 'http://submissions.ask.com/ping?sitemap=', 'http://www.bing.com/webmaster/ping.aspx?siteMap=', 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=SitemapWriter&url=');
foreach ($services as $service) {
http_download_file($service . urlencode(get_custom_base_url() . '/ocp_sitemap.xml'), NULL, false);
}
}
}
}
示例7: run
/**
* Standard modular run function.
*
* @return array An array of tuples: The task row to show, the number of seconds until it is due (or NULL if not on a timer), the number of things to sort out (or NULL if not on a queue), The name of the config option that controls the schedule (or NULL if no option).
*/
function run()
{
if (!addon_installed('tickets')) {
return array();
}
require_lang('tickets');
require_code('tickets');
require_code('tickets2');
$outstanding = 0;
$tickets = get_tickets(get_member(), NULL, false, true);
if (!is_null($tickets)) {
foreach ($tickets as $topic) {
if ($topic['closed'] == 0) {
$outstanding++;
}
}
}
if ($outstanding > 0) {
$status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_0', array('_GUID' => 'g578142633c6f3d37776e82a869deb91'));
} else {
$status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_1', array('_GUID' => 'h578142633c6f3d37776e82a869deb91'));
}
$url = build_url(array('page' => 'tickets', 'type' => 'misc'), get_module_zone('tickets'));
$tpl = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => $url, 'STATUS' => $status, 'TASK' => do_lang_tempcode('SUPPORT_TICKETS'), 'INFO' => do_lang_tempcode('NUM_QUEUE', escape_html(integer_format($outstanding)))));
return array(array($tpl, NULL, $outstanding, NULL));
}
示例8: render_field_value
/**
* Convert a field value to something renderable.
*
* @param array The field details
* @param mixed The raw value
* @return mixed Rendered field (tempcode or string)
*/
function render_field_value($field, $ev)
{
if (is_object($ev)) {
return $ev;
}
return escape_html($ev);
}
示例9: run
/**
* Standard modular run function for RSS hooks.
*
* @param string A list of categories we accept from
* @param TIME Cutoff time, before which we do not show results from
* @param string Prefix that represents the template set we use
* @set RSS_ ATOM_
* @param string The standard format of date to use for the syndication type represented in the prefix
* @param integer The maximum number of entries to return, ordering by date
* @return ?array A pair: The main syndication section, and a title (NULL: error)
*/
function run($_filters, $cutoff, $prefix, $date_string, $max)
{
if (!addon_installed('cedi')) {
return NULL;
}
if (!has_actual_page_access(get_member(), 'cedi')) {
return NULL;
}
$filters = ocfilter_to_sqlfragment($_filters, 'id', 'seedy_children', 'parent_id', 'parent_id', 'child_id');
$content = new ocp_tempcode();
$rows = $GLOBALS['SITE_DB']->query('SELECT * FROM ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'seedy_pages WHERE ' . $filters . ' AND add_date>' . strval((int) $cutoff) . ' ORDER BY add_date DESC', $max);
foreach ($rows as $row) {
$id = strval($row['id']);
if (!has_category_access(get_member(), 'seedy_page', strval($row['id']))) {
continue;
}
$author = '';
$news_date = date($date_string, $row['add_date']);
$edit_date = '';
$news_title = xmlentities(escape_html(get_translated_text($row['title'])));
$_summary = get_translated_tempcode($row['description']);
$summary = xmlentities($_summary->evaluate());
$news = '';
$category = '';
$category_raw = '';
$view_url = build_url(array('page' => 'cedi', 'type' => 'misc', 'id' => $row['id'] == db_get_first_id() ? NULL : $row['id']), get_module_zone('cedi'), NULL, false, false, true);
$if_comments = new ocp_tempcode();
$content->attach(do_template($prefix . 'ENTRY', array('VIEW_URL' => $view_url, 'SUMMARY' => $summary, 'EDIT_DATE' => $edit_date, 'IF_COMMENTS' => $if_comments, 'TITLE' => $news_title, 'CATEGORY_RAW' => $category_raw, 'CATEGORY' => $category, 'AUTHOR' => $author, 'ID' => $id, 'NEWS' => $news, 'DATE' => $news_date)));
}
require_lang('cedi');
return array($content, do_lang('CEDI_PAGES'));
}
示例10: run
/**
* Standard modular run function for preview hooks.
*
* @return array A pair: The preview, the updated post Comcode
*/
function run()
{
if (!has_specific_permission(get_member(), 'comcode_dangerous')) {
exit;
}
require_code('zones2');
require_code('zones3');
$bparameters = '';
$bparameters_xml = '';
$block = post_param('block');
$parameters = get_block_parameters($block);
$parameters[] = 'failsafe';
$parameters[] = 'cache';
$parameters[] = 'quick_cache';
foreach ($parameters as $parameter) {
$value = post_param($parameter, NULL);
if (is_null($value)) {
if (post_param_integer('tick_on_form__' . $parameter, NULL) === NULL) {
continue;
}
// If not on form, continue, otherwise must be 0
$value = '0';
}
if ($value != '' && ($parameter != 'failsafe' || $value == '1') && ($parameter != 'cache' || $value != block_cache_default($block)) && ($parameter != 'quick_cache' || $value == '1')) {
$bparameters .= ' ' . $parameter . '="' . str_replace('"', '\\"', $value) . '"';
$bparameters_xml = '<blockParam key="' . escape_html($parameter) . '" val="' . escape_html($value) . '" />';
}
}
$comcode = '[block' . $bparameters . ']' . $block . '[/block]';
$preview = comcode_to_tempcode($comcode);
return array($preview, NULL);
}
示例11: _redirect_screen
/**
* Redirect the user - transparently, storing a message that will be shown on their destination page.
*
* @param tempcode Title to display on redirect page
* @param mixed Destination URL (may be Tempcode)
* @param mixed Message to show (may be Tempcode)
* @param boolean For intermediatory hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediatory)
* @param ID_TEXT Code of message type to show
* @set warn inform fatal
* @return tempcode Redirection message (likely to not actually be seen due to instant redirection)
*/
function _redirect_screen($title, $url, $text, $intermediatory_hop = false, $msg_type = 'inform')
{
if (is_object($url)) {
$url = $url->evaluate();
}
global $FORCE_META_REFRESH, $ATTACHED_MESSAGES_RAW;
$special_page_type = get_param('special_page_type', 'view');
if ($special_page_type == 'view' && $GLOBALS['NON_PAGE_SCRIPT'] == 0 && !headers_sent() && !$FORCE_META_REFRESH) {
foreach ($ATTACHED_MESSAGES_RAW as $message) {
$GLOBALS['SITE_DB']->query_insert('messages_to_render', array('r_session_id' => get_session_id(), 'r_message' => is_object($message[0]) ? $message[0]->evaluate() : escape_html($message[0]), 'r_type' => $message[1], 'r_time' => time()));
}
$_message = is_object($text) ? $text->evaluate() : escape_html($text);
if ($_message != '' && (count($ATTACHED_MESSAGES_RAW) == 0 || $_message != do_lang('SUCCESS') && $_message != do_lang('REDIRECTING'))) {
$GLOBALS['SITE_DB']->query_insert('messages_to_render', array('r_session_id' => get_session_id(), 'r_message' => $_message, 'r_type' => $msg_type, 'r_time' => time()));
}
if (!$intermediatory_hop) {
$hash_pos = strpos($url, '#');
if ($hash_pos !== false) {
$hash_bit = substr($url, $hash_pos);
$url = substr($url, 0, $hash_pos);
} else {
$hash_bit = '';
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'redirected=1' . $hash_bit;
}
}
require_code('site2');
assign_refresh($url, 0.0);
return do_template('REDIRECT_SCREEN', array('_GUID' => '44ce3d1ffc6536b299ed0944e8ca7253', 'URL' => $url, 'TITLE' => $title, 'TEXT' => $text));
}
示例12: run
/**
* Standard modular run function for snippet hooks. Generates XHTML to insert into a page using AJAX.
*
* @return tempcode The snippet
*/
function run()
{
$sup = get_param('block_map_sup', '', true);
$_map = get_param('block_map', false, true);
if ($sup != '') {
$_map .= ',' . $sup;
}
require_code('blocks');
$map = block_params_str_to_arr($_map);
if (!array_key_exists('block', $map)) {
return new ocp_tempcode();
}
$auth_key = get_param_integer('auth_key');
// Check permissions
$test = $GLOBALS['SITE_DB']->query_value_null_ok('temp_block_permissions', 'p_block_constraints', array('p_session_id' => get_session_id(), 'id' => $auth_key));
if (is_null($test) || !block_signature_check(block_params_str_to_arr($test), $map)) {
require_lang('permissions');
return paragraph(do_lang_tempcode('ACCESS_DENIED__ACCESS_DENIED', escape_html($map['block'])));
}
// Cleanup
$GLOBALS['SITE_DB']->query('DELETE FROM ' . get_table_prefix() . 'temp_block_permissions WHERE p_time<' . strval(time() - 60 * 60 * intval(get_option('session_expiry_time'))));
// Return block snippet
global $CSSS, $JAVASCRIPTS;
$CSSS = array();
$JAVASCRIPTS = array();
$out = new ocp_tempcode();
$out->attach(symbol_tempcode('CSS_TEMPCODE'));
$out->attach(symbol_tempcode('JS_TEMPCODE'));
$out->attach(do_block($map['block'], $map));
return $out;
}
示例13: run
/**
* Standard modular run function for do_next_menu hooks. They find links to put on standard navigation menus of the system.
*
* @return array Array of links and where to show
*/
function run()
{
if (!addon_installed('chat')) {
return array();
}
return array(array('cms', 'chatrooms', array('cms_chat', array('type' => 'misc'), get_module_zone('cms_chat')), do_lang_tempcode('ITEMS_HERE', do_lang_tempcode('ROOMS'), make_string_tempcode(escape_html(integer_format($GLOBALS['SITE_DB']->query_value_null_ok('chat_rooms', 'COUNT(*)', NULL, '', true))))), 'DOC_CHAT'), array('structure', 'chatrooms', array('admin_chat', array('type' => 'misc'), get_module_zone('admin_chat')), do_lang_tempcode('ROOMS'), 'DOC_CHAT'));
}
示例14: run
/**
* Standard modular run function.
*
* @return array An array of tuples: The task row to show, the number of seconds until it is due (or NULL if not on a timer), the number of things to sort out (or NULL if not on a queue), The name of the config option that controls the schedule (or NULL if no option).
*/
function run()
{
if (!addon_installed('ocf_forum')) {
return array();
}
if (get_forum_type() != 'ocf') {
return array();
}
require_lang('ocf_config');
$forum_id = $GLOBALS['FORUM_DRIVER']->forum_id_from_name(get_option('reported_posts_forum'));
if (is_null($forum_id)) {
return array();
}
$where = 't_forum_id=' . strval($forum_id) . ' AND t_is_open=1';
$query = 'SELECT COUNT(*) FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_topics WHERE ' . $where;
$outstanding = $GLOBALS['FORUM_DB']->query_value_null_ok_full($query);
if ($outstanding > 0) {
$status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_0', array('_GUID' => 'e578142633c6f3d37776e82a869deb91'));
} else {
$status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_1', array('_GUID' => 'f578142633c6f3d37776e82a869deb91'));
}
$url = $GLOBALS['FORUM_DRIVER']->forum_url($forum_id);
$tpl = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => $url, 'STATUS' => $status, 'TASK' => do_lang_tempcode('REPORTED_POSTS_FORUM'), 'INFO' => do_lang_tempcode('NUM_QUEUE', escape_html(integer_format($outstanding)))));
return array(array($tpl, NULL, $outstanding, NULL));
}
示例15: render_field_value
/**
* Convert a field value to something renderable.
*
* @param array The field details
* @param mixed The raw value
* @return mixed Rendered field (tempcode or string)
*/
function render_field_value($field, $ev)
{
if (is_object($ev)) {
return $ev;
}
return make_string_tempcode(nl2br(escape_html($ev)));
}