當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sensitiveIO::decodeWindowsChars方法代碼示例

本文整理匯總了PHP中sensitiveIO::decodeWindowsChars方法的典型用法代碼示例。如果您正苦於以下問題:PHP sensitiveIO::decodeWindowsChars方法的具體用法?PHP sensitiveIO::decodeWindowsChars怎麽用?PHP sensitiveIO::decodeWindowsChars使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sensitiveIO的用法示例。


在下文中一共展示了sensitiveIO::decodeWindowsChars方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Create

 /**
  * Display FCKeditor.
  *
  */
 public function Create()
 {
     /*
      *Hack for FCKeditor
      *All Automne linx must be parsed and changed (FCKEditor does not allow non XHTML DTD tags)
      *Do not touch to this unless it be properly tested on IE and Gecko browsers
      * @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
      */
     $this->Value = sensitiveIO::decodeWindowsChars($this->Value);
     if ($this->ToolbarSet == 'Default' && $this->Value != '') {
         //parse all plugin tags
         $this->Value = CMS_textEditor::parseInnerContent($this->Value);
         $this->Value = str_replace($replace, $replaceBy, $this->Value);
     }
     return $this->CreateHtml();
 }
開發者ID:davidmottet,項目名稱:automne,代碼行數:20,代碼來源:fckeditor.php

示例2: parseOuterContent

 /**
  * Parse content coming out of the WYSIWYG editor to handle all plugins tags
  *
  * @param string $text The outputed text of fckeditor
  * @param string $module The module codename which made the request
  * @return string the text with all plugin tags
  * @access public
  */
 function parseOuterContent($text, $module = MOD_STANDARD_CODENAME)
 {
     //if post only contain a space or empty div or paragraph then the block is empty.
     $cleanedText = trim(str_replace(array('&#160;', '&nbsp;', ' '), '', $text));
     if ($cleanedText == '<p></p>' || $cleanedText == '<div></div>') {
         $text = '';
     }
     if ($text) {
         /*
          * we need to do some replacements to be completely conform with Automne
          * you can add here all dirty tags to be removed from editor's output
          */
         $replace = array('{' => '&#123;', '}' => '&#125;', '&#123;&#123;' => '{{', '&#125;&#125;' => '}}', "%7B%7B" => "{{", "%7D%7D" => "}}", "/>" => " />", "<o:p>" => "", "</o:p>" => "", "<!--[if !supportLists]-->" => "", "<!--[endif]-->" => "", "<?php" => "", "<?" => "", "?>" => "");
         $text = str_replace(array_keys($replace), $replace, $text);
         $text = sensitiveIO::decodeWindowsChars($text);
         $modulesTreatment = new CMS_modulesTags(MODULE_TREATMENT_WYSIWYG_OUTER_TAGS, RESOURCE_DATA_LOCATION_EDITION, new CMS_date());
         $wantedTags = $modulesTreatment->getWantedTags();
         //create regular expression on wanted tags
         $exp = '';
         foreach ($wantedTags as $aWantedTag) {
             $exp .= $exp ? '|<' . $aWantedTag["tagName"] : '<' . $aWantedTag["tagName"];
         }
         //is parsing needed (value contain some of these wanted tags)
         if (is_array($wantedTags) && $wantedTags && preg_match('#(' . $exp . ')+#', $text) !== false) {
             $modulesTreatment->setTreatmentParameters(array('module' => $module));
             $modulesTreatment->setDefinition($text);
             $text = $modulesTreatment->treatContent(true);
         }
     }
     return $text;
 }
開發者ID:davidmottet,項目名稱:automne,代碼行數:39,代碼來源:texteditor.php


注:本文中的sensitiveIO::decodeWindowsChars方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。