?> <input type="hidden" name="invite[emails][<?php echo $k; ?> ][first_name]" value="<?php echo esc_entities($contact["first_name"]); ?> " /> <input type="hidden" name="invite[emails][<?php echo $k; ?> ][last_name]" value="<?php echo esc_entities($contact["last_name"]); ?> " /> <input type="hidden" name="invite[emails][<?php echo $k; ?> ][email]" value="<?php echo esc_entities($contact["email"]); ?> " /> <?php } ?> </form> <script type="text/javascript"> $('webmail_form').submit(); </script> <?php }
<td width="20" valign="middle"><?php echo image_tag("sn_icons/" . SNPeer::$SN_ICONS[$sn["network"]], array('absolute' => true)); ?> </td> <td align="left"> <?php if (SNPeer::$SN_LINKS[$sn["network"]]) { ?> <a href="<?php echo sprintf(SNPeer::$SN_LINKS[$sn["network"]][0], esc_entities($sn["identifier"])); ?> " title="<?php echo sprintf(__(SNPeer::$SN_LINKS[$sn["network"]][1]), esc_entities($sn["identifier"])); ?> "><?php echo esc_entities(truncate_text($sn["identifier"], 55)); ?> </a> <?php } else { echo $sn["identifier"]; } ?> </td> </tr> <?php } ?> <?php } ?>
<dl> <dd id="im-chat"><?php echo __("IMs"); ?> </dd> <?php foreach ($jotag->getTagIMsJoinIM() as $k => $im) { ?> <?php if ($k) { ?> </dl><dl><?php } ?> <dt class="column-1"><?php echo esc_entities(ContactPeer::getTypeName(ContactPeer::$IM_TYPES, $im->getIm())); ?> </dt> <dt> <?php echo image_tag('im_icons/' . IMPeer::$IM_ICONS[$im->getIm()->getNetwork()], array('alt' => IMPeer::$IM_NETWORKS[$im->getIm()->getNetwork()], 'title' => IMPeer::$IM_NETWORKS[$im->getIm()->getNetwork()])); ?> </dt> <?php } ?> </dl> <?php } ?>
?> </p> <?php if ($invite->getInviteTagsJoinTag()) { ?> <p><?php echo $user; ?> 's JoTAGs:</p> <ul> <?php foreach ($invite->getInviteTagsJoinTag() as $tag) { ?> <li><?php echo $tag->getTag()->getJotag(); ?> </li> <?php } ?> </ul> <?php } if ($message) { ?> <p>----<br/><?php echo nl2br(esc_entities($message)); ?> <br/>----</p> <?php }
foreach ($jotag->getTagIMsJoinIM() as $k => $im) { if ($Icons_added >= 3) { break; } ?> <?php if (@IMPeer::$IM_TOOLBAR[$im->getIM()->getNetwork()] && @IMPeer::$IM_NETWORKS_IDS[$im->getIm()->getNetwork()] && !@$IM_shown[$im->getIm()->getNetwork()]) { ?> <a class="<?php echo strtolower(IMPeer::$IM_NETWORKS_IDS[$im->getIm()->getNetwork()]); ?> " href="<?php echo sprintf(IMPeer::$IM_LINKS[$im->getIM()->getNetwork()][0], esc_entities($im->getIM()->getIdentifier())); ?> " title="<?php echo sprintf(__(IMPeer::$IM_LINKS[$im->getIM()->getNetwork()][1]), esc_entities($im->getIM()->getIdentifier())); ?> " id="<?php echo strtolower(IMPeer::$IM_NETWORKS_IDS[$im->getIm()->getNetwork()]); ?> "><?php echo strtoupper(IMPeer::$IM_NETWORKS[$im->getIm()->getNetwork()]); ?> </a> <?php $IM_shown[$im->getIm()->getNetwork()] = true; $Icons_added++; } } if ($sf_user->isAuthenticated()) { ?>
</td> <?php } ?> </tr> <?php } ?> </tbody> </table> <?php echo get_partial('default/pager', array('pager' => $pager)); ?> <div class="search"> <form action="<?php echo url_for(array('module' => 'repository', 'action' => 'list')); ?> "> <input name="subquery" value="<?php echo esc_entities($sf_request->subquery); ?> "/> <input class="form-submit" type="submit" value="<?php echo __('Search %1%', array('%1%' => sfConfig::get('app_ui_label_repository'))); ?> "/> </form> </div>
function link_to_question($question) { return link_to(esc_entities($question->getTitle()), '@question?stripped_title=' . $question->getStrippedTitle()); }
* * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** Outputs JsonApi responses in dev mode. * * Note that we are using a template instead of sfActions->renderText() so that * we can also render the sfWebDebugToolbar. * * @author Phoenix Zerin <*****@*****.**> * * @package sfJwtJsonApiPlugin * @subpackage modules.jsonapi.templates */ echo '<pre>', esc_entities(print_r($result instanceof sfOutputEscaper ? $result->getRawValue() : $result, true)), '</pre>';
if (++$counter <= $max_contacts) { ?> <?php if (IMPeer::$IM_LINKS[$im["network"]]) { ?> <p><a href="<?php echo sprintf(IMPeer::$IM_LINKS[$im["network"]][0], esc_entities($im["identifier"])); ?> " title="<?php echo sprintf(__(IMPeer::$IM_LINKS[$im["network"]][1]), esc_entities($im["identifier"])); ?> " class="<?php echo IMPeer::$IM_NETWORKS_IDS[$im["network"]]; ?> "><?php echo esc_entities(truncate_text($im["identifier"], $max_chars)); ?> </a></p> <?php } else { ?> <p><a href="#" onclick="return false"><?php echo $im["identifier"]; ?> </a></p><?php } ?> <?php } ?> <?php
if ($email["registered"]) { ?> disabled<?php } else { ?> checked<?php } ?> /> </td> <td width="250px"><?php echo esc_entities(substr(trim($email["first_name"] . " " . $email["last_name"]), 0, 30)); ?> </td> <td><?php echo esc_entities(substr($email["email"], 0, 45)); if ($email["registered"]) { ?> <em>(<?php echo __("already member"); ?> </em><?php } ?> </td> </tr> <?php if (!$email["registered"]) { $k++; } ?>
} ?> <tr valign="top"> <td> <input name="rad_note"/> </td><td> <select name="rad_note_type" id="rad_title_note_type"> <?php foreach (QubitTerm::getOptionsForSelectList(QubitTaxonomy::RAD_NOTE_ID) as $value => $label) { ?> <option value="<?php echo esc_entities($value); ?> "><?php echo esc_entities($label); ?> </option> <?php } ?> </select> </td> </tr> </tbody> </table> <div class="description"> <?php echo __('Select a note type from the drop-down menu and enter note text in accordance with the following sections in RAD: 1.5E (Accompanying material); 1.8 B11 (Alpha-numeric designations); 1.8B9b (Conservation); 1.8B7 (Edition); 1.8B9 (Physical Description); 1.8B16b (Rights); 1.8B21 (General note).');
<table> <tbody> <?php foreach ($role_list as $role) { ?> <tr> <td><?php echo $role->getTitle(); ?> </td> <td> <?php echo jq_link_to_function('edit', "fillForm(" . $role->getId() . ", '" . addslashes($role->getTitle(ESC_RAW)) . "');", array('class' => 'link-edit')); ?> <?php echo link_to('remove', 'role/delete?id=' . $role->getId(), array('class' => 'link-de-activate', 'method' => 'delete', 'confirm' => 'Are you sure to delete role \'' . esc_entities(addslashes($role->getTitle(ESC_RAW))) . '\'')); ?> </td> </tr> <?php } ?> </tbody> </table> Items per page: <?php foreach ($max_array as $i => $v) { if ($i) { echo ' | '; }
<?php use_helper('Date', 'Global'); ?> <h2><?php echo esc_entities($question->getTitle()); ?> </h2> <p><?php echo __('asked by %1% %2% ago', array('%1%' => '<strong>' . $question->getUser() . '</strong>', '%2%' => time_ago_in_words($question->getCreatedAt('U')))); ?> </p> <?php echo __('%1% askeet users are interested by this question', array('%1%' => $interested_users_pager->getNbResults())); ?> <ul> <?php foreach ($interested_users_pager->getResults() as $interested_user) { ?> <li><?php echo link_to($interested_user->__toString(), '@user_profile?nickname=' . $interested_user->getNickname()); ?> </li> <?php } ?> </ul> <div id="users_pager">
<field name="bibliographicCitation"/><!-- eg. Department of the Interior, and Keyes, Perley G., [Letter] 1904 July 19, Ottawa [to] Messrs. Munson and Allan, Barristers, Winnipeg, Manitoba, 1904 --> <field name="fSpatial"/> <field name="fSubject"/> <field name="abstract"/> <!-- fields used in OurOntario toolkit for discovery or faceting --> <field name="itemLatitude"/> <field name="itemLongitude"/> <field name="dateOldest"/> <field name="dateNewest"/> <!-- associated with eliciting and managing user comments --> <field name="mystery"/> <field name="featureMystery"/> <field name="comment"/> <field name="featureComment"/> <field name="site"><?php echo esc_entities($object->getRepository()); ?> </field> <field name="recordOwner"><?php echo esc_entities($object->getInstitutionResponsibleIdentifier()); ?> </field> <field name="searchSet">Alouette</field><!-- multiple eg. Alouette, BritishColumbia, Ontario --> </doc> <?php } ?> </add>
if (@$contacts["IM"]) { ?> <li><b>IMs:</b> <ul> <?php foreach ($contacts["IM"] as $obj) { ?> <li><b><?php echo ContactPeer::getTypeName(ContactPeer::$IM_TYPES, $obj); ?> (<?php echo IMPeer::$IM_NETWORKS[$obj->getNetwork()]; ?> ):</b> <?php echo esc_entities($obj->getIdentifier()); ?> <?php } ?> </ul> </li> <?php } ?> </ul> <p>You can view the updated information by clicking the following link:</p> <p><?php echo link_to(url_for('@view_jotag?jotag=' . $jotag, true), '@view_jotag?jotag=' . $jotag, array('absolute' => true)); ?> </p>
</div> <?php if ($user->getInterests()) { ?> <div class="section"> <h2><?php echo __("Interested JoTAGs"); ?> </h2> <?php foreach ($user->getInterests() as $interest) { ?> <p> <strong><?php echo esc_entities($interest->getJotag()); ?> </strong> <span> <?php if ($interest->isAvailable()) { ?> <?php echo __("this Jotag is available!"); ?> <?php } ?> </span> <span class="actions">
/** * A function that c-escapes a string after applying {@link esc_entities()}. The * assumption is that the value will be used to generate dynamic HTML in some * way and the safest way to prevent mishap is to assume the value should have * HTML entities set properly. * * The {@link esc_js_no_entities()} method should be used to escape a string * that is ultimately not going to end up as text in an HTML document. * * @param string $value the value to escape * @return string the escaped value */ function esc_js($value) { return esc_js_no_entities(esc_entities($value)); }
public static function esc_entities($content) { return esc_entities($content); }
<?php echo link_to('Close', array('module' => 'search', 'action' => 'index', 'query' => $sf_request->query)); ?> </div> <?php } ?> <h1><?php echo __('Search results'); ?> </h1> <h1 class="label"> <?php echo esc_entities($title); ?> <div id="action-icons"> <?php echo link_to(image_tag('printer-icon.png', array('alt' => __('Print'))), array('module' => 'search', 'action' => 'index', 'query' => $sf_request->query, 'media' => 'print'), array('title' => __('Print'))); ?> </div> </h1> <?php if (isset($error)) { ?> <div class="error"> <ul>
echo tags_for_question($question); ?> </div> <?php } ?> </div> </div> <?php } ?> <h3><?php echo __('interests'); ?> </h3> <ul class="plain_list"> <?php foreach ($interests as $interest) { $question = $interest->getQuestion(); ?> <li><?php echo link_to(esc_entities($question->getTitle()), '@question?stripped_title=' . $question->getStrippedTitle()); ?> </li> <?php } ?> </ul>
*/ require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); $t = new lime_test(11); sfConfig::set('sf_charset', 'UTF-8'); // esc_entities() $t->diag('esc_entities()'); $t->is(esc_entities(10), 10, 'esc_entities() does not escape integers'); $t->is(esc_entities(false), false, 'esc_entities() does not escape booleans'); $t->is(esc_entities('foo bar'), 'foo bar', 'esc_entities() only escapes strings'); $t->is(esc_entities('<b>foo</b> bar'), '<b>foo</b> bar', 'esc_entities() only escapes strings'); // esc_raw() $t->diag('esc_raw()'); $t->is(esc_raw('foo'), 'foo', 'esc_raw() returns the first argument as is'); // esc_js() $t->diag('esc_js()'); $t->is(esc_js('alert(\'foo\' + "bar")'), 'alert('foo' + "bar")', 'esc_js() escapes javascripts'); // esc_js_no_entities() $t->diag('esc_js_no_entities()'); $t->is(esc_js_no_entities('alert(\'foo\' + "bar")'), 'alert(\\\'foo\\\' + \\"bar\\")', 'esc_js_no_entities() escapes javascripts'); $t->is(esc_js_no_entities('alert("hi\\there")'), 'alert(\\"hi\\\\there\\")', 'esc_js_no_entities() handles slashes correctly'); $t->is(esc_js_no_entities('alert("été")'), 'alert(\\"été\\")', 'esc_js_no_entities() preserves utf-8'); $output = <<<EOF
?> </option> <option value="not"<?php echo $item['operator'] == 'not' ? ' selected="selected"' : ''; ?> ><?php echo __('not'); ?> </option> </select> </td><td> <input type="text" name="searchFields[<?php echo $key; ?> ][query]" value="<?php echo esc_entities($item['query']); ?> "/> </td><td><?php echo __('in'); ?> <select style="width: 90%;" name="searchFields[<?php echo $key; ?> ][field]"> <option value=""<?php echo $item['field'] == '' ? ' selected="selected"' : ''; ?> ><?php echo __('Any field');