本文整理汇总了PHP中html::clean_attribute方法的典型用法代码示例。如果您正苦于以下问题:PHP html::clean_attribute方法的具体用法?PHP html::clean_attribute怎么用?PHP html::clean_attribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::clean_attribute方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: t
}
?>
<div class="g-block ui-helper-clearfix">
<a href="<?php
echo url::site("admin/themes/preview/admin/{$id}");
?>
" class="g-dialog-link" title="<?php
echo t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr();
?>
">
<img src="<?php
echo url::file("themes/{$id}/thumbnail.png");
?>
"
alt="<?php
echo html::clean_attribute($info->name);
?>
" />
<h3> <?php
echo $info->name;
?>
</h3>
<p>
<?php
echo $info->description;
?>
</p>
</a>
</div>
<?php
$count++;
示例2:
?>
"
class="g-avatar"
alt="<?php
echo html::clean_attribute($comment->author_name());
?>
"
width="40"
height="40" />
</a>
<p><a href="mailto:<?php
echo html::clean_attribute($comment->author_email());
?>
"
title="<?php
echo html::clean_attribute($comment->author_email());
?>
"> <?php
echo html::clean($comment->author_name());
?>
</a></p>
</td>
<td>
<div class="g-right">
<?php
$item = $comment->item();
?>
<div class="g-item g-photo">
<a href="<?php
echo $item->url();
?>
示例3: foreach
?>
<?php
foreach ($files as $file) {
?>
<li class="ui-icon-left">
<span class="ui-icon <?php
echo is_dir($file) ? "ui-icon-folder-collapsed" : "ui-icon-document";
?>
"></span>
<span class="<?php
echo is_dir($file) ? "gDirectory" : "gFile";
?>
"
ref="<?php
echo html::clean_attribute($file);
?>
" >
<?php
echo html::clean(basename($file));
?>
</span>
</li>
<?php
}
?>
<?php
if (!$files) {
?>
<li> <i> <?php
echo t("empty");
示例4: t
?>
" id="g-search-form" class="g-short-form">
<fieldset>
<legend>
<?php
echo t("Search");
?>
</legend>
<ul>
<li>
<label for="q"><?php
echo t("Search the gallery");
?>
</label>
<input name="q" id="q" type="text" value="<?php
echo html::clean_attribute($q);
?>
" class="text" />
</li>
<li>
<input type="submit" value="<?php
echo t("Search")->for_html_attr();
?>
" class="submit" />
</li>
</ul>
</fieldset>
</form>
<div id="g-search-results">
<h1><?php
示例5: defined
<?php
defined("SYSPATH") or die("No direct script access.");
?>
<div id="l10n-client" class="hidden">
<div class="labels">
<span id="l10n-client-toggler">
<a id="g-minimize-l10n">_</a>
<a id="g-close-l10n" title="<?php
echo t("Stop the translation mode")->for_html_attr();
?>
"
href="<?php
echo html::clean_attribute(url::site("l10n_client/toggle_l10n_mode?csrf=" . access::csrf_token()));
?>
">X</a>
</span>
<div class="label strings"><h2><?php
echo t("Page text");
?>
<? if (!Input::instance()->get('show_all_l10n_messages')): ?>
<a style="background-color:#fff" href="<?php
echo url::site("admin/languages?show_all_l10n_messages=1");
?>
"><?php
echo t("(Show all)");
?>
</a>
<? endif; ?>
</h2></div>
<div class="label source"><h2><?php
示例6: defined
<?php
defined("SYSPATH") or die("No direct script access.");
?>
<ul>
<? foreach ($comments as $comment): ?>
<li class="<?php
echo text::alternate("g-even", "g-odd");
?>
">
<img src="<?php
echo $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true));
?>
"
class="g-avatar"
alt="<?php
echo html::clean_attribute($comment->author_name());
?>
"
width="32"
height="32" />
<?php
echo gallery::date_time($comment->created);
?>
<?php
echo t('<a href="#">%author_name</a> said <em>%comment_text</em>', array("author_name" => html::clean($comment->author_name()), "comment_text" => text::limit_words(nl2br(html::purify($comment->text)), 50)));
?>
</li>
<? endforeach ?>
</ul>
示例7: t
?>
">
<td id="g-user-<?php
echo $user->id;
?>
" class="g-core-info g-draggable">
<img src="<?php
echo $user->avatar_url(20, $theme->url("images/avatar.jpg", true));
?>
"
title="<?php
echo t("Drag user onto a group to add as a new member")->for_html_attr();
?>
"
alt="<?php
echo html::clean_attribute($user->name);
?>
"
width="20"
height="20" />
<?php
echo html::clean($user->name);
?>
</td>
<td>
<?php
echo html::clean($user->full_name);
?>
</td>
<td>
<?php
示例8: t
">
<?php
echo t("Contact");
?>
</a>
<?php
}
?>
</div>
<h1>
<img src="<?php
echo $user->avatar_url(40, $theme->url("images/avatar.jpg", true));
?>
"
alt="<?php
echo html::clean_attribute($user->display_name());
?>
"
class="g-avatar g-left" width="40" height="40" />
<?php
echo t("User profile: %name", array("name" => $user->display_name()));
?>
</h1>
<?php
foreach ($info_parts as $info) {
?>
<div class="g-block">
<h2><?php
echo html::purify($info->title);
?>
</h2>
示例9: clean_attribute_test
public function clean_attribute_test()
{
$safe_string = SafeString::of_safe_html("hello's <p >world</p>");
$safe_string = html::clean_attribute($safe_string);
$this->assert_equal("hello's <p >world</p>", $safe_string);
}