当前位置: 首页>>代码示例>>PHP>>正文


PHP html::escapeHTML方法代码示例

本文整理汇总了PHP中html::escapeHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP html::escapeHTML方法的具体用法?PHP html::escapeHTML怎么用?PHP html::escapeHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html的用法示例。


在下文中一共展示了html::escapeHTML方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getURL

 public final function getURL($escape = false)
 {
     if ($escape) {
         return html::escapeHTML($this->url);
     }
     return $this->url;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:7,代码来源:class.dc.ieModule.php

示例2: prepend

 protected function prepend()
 {
     global $oktAutoloadPaths;
     # chargement des principales locales
     l10n::set(__DIR__ . '/locales/' . $this->okt->user->language . '/main');
     # autoload
     $oktAutoloadPaths['diaryController'] = __DIR__ . '/inc/class.diary.controller.php';
     $oktAutoloadPaths['diaryRecordset'] = __DIR__ . '/inc/class.diary.recordset.php';
     $oktAutoloadPaths['diaryMonthlyCalendar'] = __DIR__ . '/inc/class.diary.monthly.calendar.php';
     $oktAutoloadPaths['diaryFilters'] = __DIR__ . '/inc/class.diary.filters.php';
     # permissions
     $this->okt->addPermGroup('diary', __('m_diary_perm_group'));
     $this->okt->addPerm('diary', __('m_diary_perm_global'), 'diary');
     $this->okt->addPerm('diary_add', __('m_diary_perm_add'), 'diary');
     $this->okt->addPerm('diary_remove', __('m_diary_perm_remove'), 'diary');
     $this->okt->addPerm('diary_display', __('m_diary_perm_display'), 'diary');
     $this->okt->addPerm('diary_config', __('m_diary_perm_config'), 'diary');
     # tables
     $this->table = $this->db->prefix . 'mod_diary';
     # configuration
     $this->config = $this->okt->newConfig('conf_diary');
     $this->config->url = $this->okt->page->getBaseUrl() . $this->config->public_list_url[$this->okt->user->language];
     # définition des routes
     $this->okt->router->addRoute('diaryList', new oktRoute('^(?:' . html::escapeHTML(implode('|', $this->config->public_list_url)) . ')/?(.*)?$', 'diaryController', 'diaryList'));
     $this->okt->router->addRoute('diaryEvent', new oktRoute('^(?:' . html::escapeHTML(implode('|', $this->config->public_event_url)) . ')/(.*)$', 'diaryController', 'diaryEvent'));
     # répertoire upload
     $this->upload_dir = OKT_UPLOAD_PATH . '/diary/';
     $this->upload_url = OKT_UPLOAD_URL . '/diary/';
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:29,代码来源:module_handler.php

示例3: init

 protected function init()
 {
     $this->name = __('Database export');
     $this->task = __('Download database of current blog');
     $this->export_name = html::escapeHTML($this->core->blog->id . '-backup.txt');
     $this->export_type = 'export_blog';
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:7,代码来源:lib.ie.maintenance.php

示例4: gui

 public function gui()
 {
     if ($this->status) {
         dcPage::success(__('Content successfully imported.'));
     }
     echo '<form action="' . $this->getURL(true) . '" method="post">' . '<p>' . sprintf(__('Add a feed content to the current blog: <strong>%s</strong>.'), html::escapeHTML($this->core->blog->name)) . '</p>' . '<p><label for="feed_url">' . __('Feed URL:') . '</label>' . form::field('feed_url', 50, 300, html::escapeHTML($this->feed_url)) . '</p>' . '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:7,代码来源:class.dc.import.feed.php

示例5: publicTplFormBottom

    /**
     * Affichage du captcha côté public
     *
     * @param object $okt
     * @param string $sCaptchaId
     */
    public static function publicTplFormBottom($okt, $sCaptchaId)
    {
        if ($sCaptchaId == 'recaptcha') {
            $aAcceptedLanguages = array('en', 'nl', 'fr', 'de', 'pt', 'ru', 'es', 'tr');
            if (in_array($okt->user->language, $aAcceptedLanguages)) {
                $sLanguage = $okt->user->language;
            } elseif (in_array($okt->config->language, $aAcceptedLanguages)) {
                $sLanguage = $okt->config->language;
            } else {
                $sLanguage = 'en';
            }
            echo '<script type="text/javascript">
			//<![CDATA[

			var RecaptchaOptions = {
				theme: "' . $okt->recaptcha->config->theme . '",
				lang: "' . $sLanguage . '"
			};

			//]]>
			</script>';
            require_once __DIR__ . '/recaptcha-php-1.11/recaptchalib.php';
            echo recaptcha_get_html(html::escapeHTML($okt->recaptcha->config->publickey));
        }
    }
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:module_handler.php

示例6: postLine

 private function postLine()
 {
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     switch ($this->rs->post_status) {
         case 1:
             $img_status = sprintf($img, __('published'), 'check-on.png');
             break;
         case 0:
             $img_status = sprintf($img, __('unpublished'), 'check-off.png');
             break;
         case -1:
             $img_status = sprintf($img, __('scheduled'), 'scheduled.png');
             break;
         case -2:
             $img_status = sprintf($img, __('pending'), 'check-wrn.png');
             break;
     }
     $protected = '';
     if ($this->rs->post_password) {
         $protected = sprintf($img, __('protected'), 'locker.png');
     }
     $selected = '';
     if ($this->rs->post_selected) {
         $selected = sprintf($img, __('selected'), 'selected.png');
     }
     $attach = '';
     $nb_media = $this->rs->countMedia();
     if ($nb_media > 0) {
         $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments');
         $attach = sprintf($img, sprintf($attach_str, $nb_media), 'attach.png');
     }
     $res = '<tr class="line' . ($this->rs->post_status != 1 ? ' offline' : '') . '"' . ' id="p' . $this->rs->post_id . '">';
     $res .= '<td class="nowrap">' . form::checkbox(array('entries[]'), $this->rs->post_id, '', '', '', !$this->rs->isEditable()) . '</td>' . '<td class="maximal"><a href="' . $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id) . '">' . html::escapeHTML($this->rs->post_title) . '</a></td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->post_dt) . '</td>' . '<td class="nowrap">' . $this->rs->user_id . '</td>' . '<td class="nowrap">' . $this->rs->nb_comment . '</td>' . '<td class="nowrap">' . $this->rs->nb_trackback . '</td>' . '<td class="nowrap status">' . $img_status . ' ' . $selected . ' ' . $protected . ' ' . $attach . '</td>' . '</tr>';
     return $res;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:35,代码来源:list.php

示例7: gui

 public function gui()
 {
     if ($this->status) {
         echo '<p class="message">' . __('Content successfully imported.') . '</p>';
     }
     echo '<h3>' . __('Import from a feed') . '</h3>' . '<p>' . sprintf(__('This will import a feed (RSS or Atom) a as new content in the current blog: %s.'), '<strong>' . html::escapeHTML($this->core->blog->name) . '</strong>') . '</p>' . '<form action="' . $this->getURL(true) . '" method="post">' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<p><label>' . __('Feed URL:') . ' ' . form::field('feed_url', 40, 300, html::escapeHTML($this->feed_url)) . '</label></p>' . '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
 }
开发者ID:HackerMajor,项目名称:root,代码行数:7,代码来源:class.dc.import.feed.php

示例8: setFrom

 public function setFrom()
 {
     if (!empty($this->okt->config->email['name'])) {
         $this->message->setFrom(array($this->okt->config->email['from'] => html::escapeHTML($this->okt->config->email['name'])));
     } else {
         $this->message->setFrom($this->okt->config->email['from']);
     }
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:8,代码来源:class.oktMail.php

示例9: text

 public static function text(&$w)
 {
     global $core;
     if ($w->homeonly && $core->url->type != 'default') {
         return;
     }
     $res = '<div class="wikitext ' . $w->class . '">' . ($w->title ? '<h1>' . html::escapeHTML($w->title) . '</h1>' : '') . $core->wikiTransform($w->content) . '</div>';
     return $res;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:9,代码来源:_public.php

示例10: getHTML

 /**
  * Construit le HTML à partir de la pile d'éléments.
  *
  * @return string
  */
 public function getHTML()
 {
     if (!$this->hasItem()) {
         return null;
     }
     if (count($this->stack) > 1) {
         return '<ul><li>' . implode('</li><li>', array_map(array('html', 'escapeHTML'), $this->stack)) . '</li></ul>';
     }
     return '<p>' . html::escapeHTML($this->stack[0]) . '</p>';
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:15,代码来源:class.html.stack.php

示例11: listImportExportModules

function listImportExportModules($core, $modules)
{
    $res = '';
    foreach ($modules as $id) {
        $o = new $id($core);
        $res .= '<dt><a href="' . $o->getURL(true) . '">' . html::escapeHTML($o->name) . '</a></dt>' . '<dd>' . html::escapeHTML($o->description) . '</dd>';
        unset($o);
    }
    return '<dl class="modules">' . $res . '</dl>';
}
开发者ID:nikrou,项目名称:dotclear,代码行数:10,代码来源:index.php

示例12: settingLine

function settingLine($id, $s, $ns, $field_name, $strong_label)
{
    if ($s['type'] == 'boolean') {
        $field = form::combo(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $id), array(__('yes') => 1, __('no') => 0), $s['value']);
    } else {
        $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $id), 40, null, html::escapeHTML($s['value']));
    }
    $slabel = $strong_label ? '<strong>%s</strong>' : '%s';
    return '<tr>' . '<td><label for="s_' . $id . '">' . sprintf($slabel, html::escapeHTML($id)) . '</label></td>' . '<td>' . $field . '</td>' . '<td>' . $s['type'] . '</td>' . '<td>' . html::escapeHTML($s['label']) . '</td>' . '</tr>';
}
开发者ID:HackerMajor,项目名称:root,代码行数:10,代码来源:index.php

示例13: box

 /**
 Returns an hierarchical categories combo from a category record
 
 @param	categories		<b>record</b>		the category record
 @return	<b>array</b> the combo box (form::combo -compatible format)
 */
 public static function getCategoriesCombo($categories, $include_empty = true, $use_url = false)
 {
     $categories_combo = array();
     if ($include_empty) {
         $categories_combo = array(new formSelectOption(__('(No cat)'), ''));
     }
     while ($categories->fetch()) {
         $categories_combo[] = new formSelectOption(html::escapeHTML($categories->cat_title) . ' (' . $categories->nb_post . ')', $use_url ? $categories->cat_url : $categories->cat_id, $categories->level - 1 ? 'sub-option' . ($categories->level - 1) : '');
     }
     return $categories_combo;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:17,代码来源:lib.admincombos.php

示例14: getContent

 public static function getContent(&$rs, $absolute_urls = false)
 {
     # Not very nice hack but it does the job :)
     if (isset($GLOBALS['_ctx']) && $GLOBALS['_ctx']->short_feed_items === true) {
         $_ctx =& $GLOBALS['_ctx'];
         $c = parent::getContent($rs, $absolute_urls);
         $c = context::remove_html($c);
         $c = context::cut_string($c, 350);
         $c = '<p>' . $c . '... ' . '<em><a href="' . $rs->getURL() . '">' . __('Read') . '</em> ' . html::escapeHTML($rs->post_title) . '</a></p>';
         return $c;
     }
     if ($rs->core->blog->settings->use_smilies) {
         return self::smilies(parent::getContent($rs, $absolute_urls), $rs->core->blog);
     }
     return parent::getContent($rs, $absolute_urls);
 }
开发者ID:HackerMajor,项目名称:root,代码行数:16,代码来源:rs.extension.php

示例15: getDayContent

 /**
  * Retourne le HTML additionnel d'un jour dans le calendrier.
  *
  * @return string
  */
 protected function getDayContent()
 {
     # si on as pas d'évènement pour cette date, on passe à la suivante
     if (!isset($this->aDatesEvents[$this->iDate])) {
         return null;
     }
     # si on est pas sur un vrai jour on passe à la suivante
     if (!$this->bRealDay) {
         return null;
     }
     $aEvents = array();
     foreach ($this->aDatesEvents[$this->iDate] as $aEvent) {
         $aEvents[] = sprintf($this->aConfig['htmlEventItem'], html::escapeHTML($aEvent['title']), $aEvent['url'], 'disponibility_' . $aEvent['disponibility'], !empty($aEvent['color']) ? ' style="background-color: #' . $aEvent['color'] . ' "' : '');
     }
     return sprintf($this->aConfig['htmlEventsList'], implode('', $aEvents));
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:21,代码来源:class.diary.monthly.calendar.php


注:本文中的html::escapeHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。