本文整理汇总了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();
}
示例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(' ', ' ', ' '), '', $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('{' => '{', '}' => '}', '{{' => '{{', '}}' => '}}', "%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;
}