Index: typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php (révision 7702)
+++ typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php (copie de travail)
@@ -165,28 +165,24 @@
if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.']['formatblock.']) || !$this->thisConfig['buttons.']['formatblock.']['orderItems']) {
asort($blockElementsOptions);
}
- // utf8-encode labels if we are responding to an IRRE ajax call
- if (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) {
- foreach ($blockElementsOptions as $item => $label) {
- $blockElementsOptions[$item] = $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet);
- }
- }
// Generating the javascript options
$JSBlockElements = array();
$JSBlockElements[] = array($first, 'none');
foreach ($blockElementsOptions as $item => $label) {
$JSBlockElements[] = array($label, $item);
}
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($JSBlockElements, $this->htmlAreaRTE->OutputCharset, 'utf-8');
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($JSBlockElements, $GLOBALS['LANG']->charSet, 'utf-8');
+ }
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.formatblock.options = ' . json_encode($JSBlockElements) . ';';
}
return $registerRTEinJavascriptString;
}
-
-} // end of class
-
+}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php']);
}
-
?>
\ No newline at end of file
Index: typo3/sysext/rtehtmlarea/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php (révision 7702)
+++ typo3/sysext/rtehtmlarea/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php (copie de travail)
@@ -195,18 +195,17 @@
if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.']['formattext.']) || !$this->thisConfig['buttons.']['formattext.']['orderItems']) {
asort($inlineElementsOptions);
}
- // utf8-encode labels if we are responding to an IRRE ajax call
- if (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) {
- foreach ($inlineElementsOptions as $item => $label) {
- $inlineElementsOptions[$item] = $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet);
- }
- }
// Generating the javascript options
$JSInlineElements = array();
$JSInlineElements[] = array($first, 'none');
foreach ($inlineElementsOptions as $item => $label) {
$JSInlineElements[] = array($label, $item);
}
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($JSInlineElements, $this->htmlAreaRTE->OutputCharset, 'utf-8');
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($JSInlineElements, $GLOBALS['LANG']->charSet, 'utf-8');
+ }
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.formattext.options = ' . json_encode($JSInlineElements) . ';';
}
Index: typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php (révision 7702)
+++ typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php (copie de travail)
@@ -90,6 +90,11 @@
foreach ($languages as $key => $value) {
$languagesJSArray[] = array('text' => $key, 'value' => $value);
}
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($languagesJSArray, $this->htmlAreaRTE->OutputCharset, 'utf-8');
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($languagesJSArray, $GLOBALS['LANG']->charSet, 'utf-8');
+ }
$languagesJSArray = json_encode(array('options' => $languagesJSArray));
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.'. $button .'.dataUrl = "' . $this->htmlAreaRTE->writeTemporaryFile('', $button . '_' . $this->htmlAreaRTE->contentLanguageUid, 'js', $languagesJSArray) . '";';
@@ -132,13 +137,17 @@
$code = strtolower($row['lg_iso_2']).($row['lg_country_iso_2']?'-'.strtoupper($row['lg_country_iso_2']):'');
foreach ($titleFields as $titleField) {
if ($row[$titleField]) {
- $nameArray[$code] = $this->htmlAreaRTE->is_FE() ? $GLOBALS['TSFE']->csConv($row[$titleField], $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['static_info_tables']['charset']) : ($this->htmlAreaRTE->TCEform->inline->isAjaxCall ? $GLOBALS['LANG']->csConvObj->utf8_encode($row[$titleField], $GLOBALS['LANG']->charSet) : $row[$titleField]);
- $nameArray[$code] = $prefixLabelWithCode ? ($code . ' - ' . $nameArray[$code]) : ($postfixLabelWithCode ? ($nameArray[$code] . ' - ' . $code) : $nameArray[$code]);
+ $nameArray[$code] = $prefixLabelWithCode ? ($code . ' - ' . $row[$titleField]) : ($postfixLabelWithCode ? ($row[$titleField] . ' - ' . $code) : $row[$titleField]);
break;
}
}
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($nameArray, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['static_info_tables']['charset'], $this->htmlAreaRTE->OutputCharset);
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($nameArray, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['static_info_tables']['charset'], $GLOBALS['LANG']->charSet);
+ }
uasort($nameArray, 'strcoll');
return $nameArray;
}
Index: typo3/sysext/rtehtmlarea/extensions/SelectFont/class.tx_rtehtmlarea_selectfont.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/SelectFont/class.tx_rtehtmlarea_selectfont.php (révision 7702)
+++ typo3/sysext/rtehtmlarea/extensions/SelectFont/class.tx_rtehtmlarea_selectfont.php (copie de travail)
@@ -135,9 +135,7 @@
if ($this->htmlAreaRTE->is_FE()) {
$items['none'] = array($GLOBALS['TSFE']->getLLL((($buttonId == 'fontstyle') ? 'Default font' : 'Default size'), $this->LOCAL_LANG), 'none');
} else {
- $items['none'] = array(($this->htmlAreaRTE->TCEform->inline->isAjaxCall
- ? $GLOBALS['LANG']->csConvObj->utf8_encode($GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'Default font' : 'Default size'), $GLOBALS['LANG']->charSet)
- : $GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'Default font' : 'Default size')), 'none');
+ $items['none'] = array(($GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'Default font' : 'Default size')), 'none');
}
// Inserting and localizing default items
if ($hideItems != '*') {
@@ -151,7 +149,6 @@
if (!$label) {
$label = $name;
}
- $label = $this->htmlAreaRTE->TCEform->inline->isAjaxCall ? $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet) : $label;
}
$items[$name] = array($label, $this->htmlAreaRTE->cleanList($value));
}
@@ -164,7 +161,6 @@
$name = substr($name,0,-1);
if (in_array($name, $addItems)) {
$label = $this->htmlAreaRTE->getPageConfigLabel($conf['name'],0);
- $label = (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) ? $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet) : $label;
$items[$name] = array($label, $this->htmlAreaRTE->cleanList($conf['value']));
}
}
@@ -179,6 +175,11 @@
foreach ($items as $name => $option) {
$itemsJSArray[] = array('text' => $option[0], 'value' => $option[1]);
}
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($itemsJSArray, $this->htmlAreaRTE->OutputCharset, 'utf-8');
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($itemsJSArray, $GLOBALS['LANG']->charSet, 'utf-8');
+ }
$itemsJSArray = json_encode(array('options' => $itemsJSArray));
// Adding to button JS configuration
if (!is_array( $this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.'][$buttonId . '.'])) {
Index: typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php (révision 7702)
+++ typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php (copie de travail)
@@ -94,7 +94,6 @@
foreach ($RTEProperties['colors.'] as $colorName => $conf) {
$colorName = substr($colorName, 0, -1);
$colorLabel = $this->htmlAreaRTE->getPageConfigLabel($conf['name'], 0);
- $colorLabel = (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) ? $GLOBALS['LANG']->csConvObj->utf8_encode($colorLabel, $GLOBALS['LANG']->charSet) : $colorLabel;
$HTMLAreaColorname[$colorName] = array($colorLabel, strtoupper(substr($conf['value'], 1, 6)));
}
}
@@ -107,6 +106,11 @@
$HTMLAreaJSColors[] = $HTMLAreaColorname[$colorName];
}
}
+ if ($this->htmlAreaRTE->is_FE()) {
+ $GLOBALS['TSFE']->csConvObj->convArray($HTMLAreaJSColors, $this->htmlAreaRTE->OutputCharset, 'utf-8');
+ } else {
+ $GLOBALS['LANG']->csConvObj->convArray($HTMLAreaJSColors, $GLOBALS['LANG']->charSet, 'utf-8');
+ }
$configureRTEInJavascriptString .= '
RTEarea['.$RTEcounter.'].colors = ' . json_encode($HTMLAreaJSColors) . ';';
}