Bug #16542 » rtehtmlarea_bugfix_4183.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy) | ||
---|---|---|
if (is_array($RTEProperties['fonts.'])) {
|
||
reset($RTEProperties['fonts.']);
|
||
while(list($fontName,$conf)=each($RTEProperties['fonts.'])) {
|
||
$fontName=substr($fontName,0,-1);
|
||
if ($this->is_FE()) {
|
||
$string = $TSFE->sL($conf['name']);
|
||
} else {
|
||
$string = $LANG->sL($conf['name']);
|
||
}
|
||
$fontName = substr($fontName,0,-1);
|
||
$fontLabel = $this->getPageConfigLabel($conf['name'],0);
|
||
$HTMLAreaFontname[$fontName] = '
|
||
"' . str_replace('"', '\"', str_replace('\\\'', '\'', $string)) . '" : "' . $this->cleanList($conf['value']) . '"';
|
||
"' . $fontLabel . '" : "' . $this->cleanList($conf['value']) . '"';
|
||
}
|
||
}
|
||
|
||
... | ... | |
reset($RTEProperties['colors.']);
|
||
while(list($colorName,$conf)=each($RTEProperties['colors.'])) {
|
||
$colorName=substr($colorName,0,-1);
|
||
if ($this->is_FE()) {
|
||
$string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
|
||
$string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
|
||
$string = $this->feJScharCode($string);
|
||
} else {
|
||
$string = $this->getLLContent(trim($conf['name']));
|
||
}
|
||
$colorLabel = $this->getPageConfigLabel($conf['name']);
|
||
$HTMLAreaColorname[$colorName] = '
|
||
[' . $string . ' , "' . $conf['value'] . '"]';
|
||
[' . $colorLabel . ' , "' . $conf['value'] . '"]';
|
||
}
|
||
}
|
||
|
||
... | ... | |
reset($RTEProperties['classes.']);
|
||
while(list($className,$conf)=each($RTEProperties['classes.'])) {
|
||
$className = substr($className,0,-1);
|
||
if ($this->is_FE()) {
|
||
$string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
|
||
$string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
|
||
$string = $this->feJScharCode($string);
|
||
} else {
|
||
$string = $this->getLLContent(trim($conf['name']));
|
||
}
|
||
$JSClassesLabelsArray .= (($index)?',':'') . '"' . $className . '": ' . $string . $linebreak;
|
||
$classLabel = $this->getPageConfigLabel($conf['name']);
|
||
$JSClassesLabelsArray .= (($index)?',':'') . '"' . $className . '": ' . $classLabel . $linebreak;
|
||
$JSClassesValuesArray .= (($index)?',':'') . '"' . $className . '":"' . str_replace('"', '\"', str_replace('\\\'', '\'', $conf['value'])) . '"' . $linebreak;
|
||
$JSClassesNoShowArray .= (($index)?',':'') . '"' . $className . '":' . ($conf['noShow']?'true':'false') . $linebreak;
|
||
$index++;
|
||
... | ... | |
return $LLString;
|
||
}
|
||
|
||
function getPageConfigLabel($string,$JScharCode=1) {
|
||
global $LANG, $TSFE;
|
||
|
||
if ($this->is_FE()) {
|
||
$label = $TSFE->csConvObj->conv($TSFE->sL(trim($string)), $TSFE->renderCharset, $TSFE->metaCharset);
|
||
$label = str_replace('"', '\"', str_replace('\\\'', '\'', $label));
|
||
$label = $JScharCode ? $this->feJScharCode($label) : $label;
|
||
} else {
|
||
if (strcmp(substr($string,0,4),'LLL:')) {
|
||
$label = $string;
|
||
} else {
|
||
$label = $LANG->sL(trim($string));
|
||
}
|
||
$label = str_replace('"', '\"', str_replace('\\\'', '\'', $label));
|
||
$label = $JScharCode ? $LANG->JScharCode($label): $label;
|
||
}
|
||
return $label;
|
||
}
|
||
|
||
function feJScharCode($str) {
|
||
global $TSFE;
|
||
// Convert string to UTF-8:
|
- « Previous
- 1
- 2
- Next »