本文整理匯總了PHP中Inspekt::noTags方法的典型用法代碼示例。如果您正苦於以下問題:PHP Inspekt::noTags方法的具體用法?PHP Inspekt::noTags怎麽用?PHP Inspekt::noTags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Inspekt
的用法示例。
在下文中一共展示了Inspekt::noTags方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: noTags
/**
* Returns value with all tags removed.
*
* @param mixed $key
* @return mixed
*
* @tag filter
*/
function noTags($key)
{
if (!$this->keyExists($key)) {
return false;
}
return Inspekt::noTags($this->_getValue($key));
}
示例2: testNoTags
/**
*
*/
public function testNoTags()
{
$input = '<SCRIPT>alert(\'foobar\');</SCRIPT>';
$expect = 'alert(\'foobar\');';
$this->assertSame($expect, Inspekt::noTags($input));
}
示例3: array
$d['lowascii'] = ' ';
$d[] = array('foo', 'bar<br />', 'yes<P>', 1776);
$d['x']['woot'] = array('booyah' => 'meet at the bar at 7:30 pm', 'ultimate' => '<strong>hi there!</strong>');
$d['lemon'][][][][][][][][][][][][][][] = 'far';
?>
<h2>A crazy, crazy array ($d)</h2>
<?php
echo "<pre>";
echo var_dump($d);
echo "</pre>\n";
?>
<h2>Inspekt::noTags($d)</h2>
<?php
$newd = Inspekt::noTags($d);
echo "<pre>";
echo var_dump($newd);
echo "</pre>\n";
?>
<h2>Inspekt::noTagsOrSpecial($d)</h2>
<?php
$newd = Inspekt::noTagsOrSpecial($d);
echo "<pre>";
echo var_dump($newd);
echo "</pre>\n";
?>
示例4:
$message = "";
$footer = "";
if (isset($_GET["title"])) {
$title = $_GET["title"];
}
if (isset($_GET["alert"])) {
$message = $_GET["alert"];
}
if (isset($_GET["footer"])) {
$footer = $_GET["footer"];
}
$alert_modal_id = "alert";
$alert_modal_content = "<p id='alert-paragraph'>" . Inspekt::noTags($message) . "</p>";
// $alert_modal_content = '<img src="http://maps.googleapis.com/maps/api/staticmap?center=56.1138608,10.1577942&zoom=13&size=300x300&sensor=false">';
$alert_modal_title = Inspekt::noTags($title);
$alert_modal_footer = Inspekt::noTags($footer);
// get the modal
DocElement::modal($alert_modal_id, $alert_modal_title, $alert_modal_content, $alert_modal_footer);
?>
<script src="lib/plugins/jquery.viewport.mini.js"></script>
<script src="lib/plugins/jquery.event.drag-2.2/jquery.event.drag-2.2.js"></script>
<script src="lib/js/javascript.js"></script>
<script src="lib/js/form-elements.js"></script>
<script src="lib/js/smart-search.js"></script>
<script src="lib/js/jquery.easing.1.3.js"></script>
<script src="lib/js/top-ads.js"></script>
<script src="lib/js/expanded-view.js"></script>
<script src="lib/js/sticky.js"></script>
<script src="lib/js/upload-multiple-images.js"></script>
示例5: cleanTagsValidation
/**
* Descricao : Limpa as tags que um dado possa conter
*
* @param Field field : Um objeto field
*
*/
private function cleanTagsValidation($field)
{
if ($field->getMethod() == "get") {
$_GET[$field->getName()] = Inspekt::noTags($_GET[$field->getName()]);
} else {
$_POST[$field->getName()] = Inspekt::noTags($_POST[$field->getName()]);
}
return true;
}
示例6: noTags
/**
* Returns value with all tags removed.
*
* @param mixed $key
* @return mixed
* @throws Exception
* @tag filter
*/
public function noTags($key)
{
return Inspekt::noTags($this->getValue($key));
}