00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00047 unset($MCONF);
00048 require ('conf.php');
00049 require ($BACK_PATH.'init.php');
00050 require ($BACK_PATH.'template.php');
00051
00052
00053
00054
00062 class SC_rte_cleaner {
00063 var $content;
00064 var $siteURL;
00065 var $doc;
00066
00072 function init() {
00073 global $BACK_PATH;
00074
00075 $this->siteURL = substr(t3lib_div::getIndpEnv('TYPO3_SITE_URL'),0,-1);
00076
00077 $this->doc = t3lib_div::makeInstance('template');
00078 $this->doc->backPath = $BACK_PATH;
00079 $this->doc->form = '';
00080 $this->doc->JScode=$this->doc->wrapScriptTags('
00081 var RTEobj = self.parent.parent;
00082
00083 function setSelectedTextContent(content) {
00084 var oSel = RTEobj.GLOBAL_SEL;
00085 var sType = oSel.type;
00086 if (sType=="Text") {
00087 oSel.pasteHTML(content);
00088 }
00089 }
00090 ');
00091 }
00092
00098 function main() {
00099 $this->content='';
00100 $this->content.=$this->doc->startPage('RTE cleaner');
00101
00102 $this->content.=$this->doc->wrapScriptTags('
00103 setSelectedTextContent(unescape("'.rawurlencode(strip_tags(t3lib_div::_GP("processContent"))).'"));
00104 RTEobj.edHidePopup();
00105 ');
00106 }
00107
00113 function printContent() {
00114 $this->content.= $this->doc->endPage();
00115 echo $this->content;
00116 }
00117 }
00118
00119
00120 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rte/app/rte_cleaner.php']) {
00121 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rte/app/rte_cleaner.php']);
00122 }
00123
00124
00125
00126
00127
00128
00129 $SOBE = t3lib_div::makeInstance('SC_rte_cleaner');
00130 $SOBE->init();
00131 $SOBE->main();
00132 $SOBE->printContent();
00133 ?>