diff -ru TYPO3core/t3lib/class.t3lib_div.php TYPO3core.utfjs/t3lib/class.t3lib_div.php --- TYPO3core/t3lib/class.t3lib_div.php 2005-10-04 13:58:14.000000000 +0200 +++ TYPO3core.utfjs/t3lib/class.t3lib_div.php 2005-10-22 18:12:41.922450248 +0200 @@ -3881,6 +3881,16 @@ return $paramsArr; } + + function quoteJSvalue($value, $inScriptTags = false) { + $value = addcslashes($value, '\''.chr(10).chr(13)); + if (!$inScriptTags) { + $value = htmlspecialchars($value); + } + return '\''.$value.'\''; + } + + } ?> \ No newline at end of file diff -ru TYPO3core/t3lib/class.t3lib_tsfebeuserauth.php TYPO3core.utfjs/t3lib/class.t3lib_tsfebeuserauth.php --- TYPO3core/t3lib/class.t3lib_tsfebeuserauth.php 2005-06-20 00:48:48.000000000 +0200 +++ TYPO3core.utfjs/t3lib/class.t3lib_tsfebeuserauth.php 2005-10-22 19:49:29.268925576 +0200 @@ -879,14 +879,13 @@ #include('./'.TYPO3_mainDir.'sysext/lang/locallang_tsfe.php'); if (!is_array($LOCAL_LANG)) $LOCAL_LANG=array(); } - - $labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset. - + // Convert to utf-8, then to entities: if ($GLOBALS['LANG']->charSet!='utf-8') { - $labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($labelStr,$GLOBALS['LANG']->charSet); + $labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($GLOBALS['LANG']->getLL($key), $GLOBALS['LANG']->charSet); } - $labelStr = $GLOBALS['LANG']->csConvObj->utf8_to_entities($labelStr); + + $labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset. // Return the result: return $labelStr; diff -ru TYPO3core/t3lib/jsfunc.menu.js TYPO3core.utfjs/t3lib/jsfunc.menu.js --- TYPO3core/t3lib/jsfunc.menu.js 2005-10-21 16:53:56.201678720 +0200 +++ TYPO3core.utfjs/t3lib/jsfunc.menu.js 2005-10-22 18:43:20.576103584 +0200 @@ -52,7 +52,7 @@ function JSmenuAddItem (parent,prevItem,openID,title,url,target) { this.count++; var entryID = this.count; - this.entry[entryID] = new JSmenuItem (this, entryID, 0, parent, openID, unescape(title), unescape(url), target); + this.entry[entryID] = new JSmenuItem (this, entryID, 0, parent, openID, title, url, target); if (prevItem) { this.entry[prevItem].nextItem = entryID; } else if(parent) { diff -ru TYPO3core/typo3/sysext/cms/tslib/class.tslib_content.php TYPO3core.utfjs/typo3/sysext/cms/tslib/class.tslib_content.php --- TYPO3core/typo3/sysext/cms/tslib/class.tslib_content.php 2005-10-07 14:16:21.000000000 +0200 +++ TYPO3core.utfjs/typo3/sysext/cms/tslib/class.tslib_content.php 2005-10-22 19:47:30.798935752 +0200 @@ -1971,7 +1971,7 @@ $hiddenfields = '
'.$hiddenfields.'
'; if ($conf['REQ']) { - $validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode(',',$fieldlist).'\',\''.rawurlencode($conf['goodMess']).'\',\''.rawurlencode($conf['badMess']).'\',\''.rawurlencode($conf['emailMess']).'\')"'; + $validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode(',',$fieldlist).'\','.t3lib_div::quoteJSvalue($conf['goodMess']).','.t3lib_div::quoteJSvalue($conf['badMess']).','.t3lib_div::quoteJSvalue($conf['emailMess']).')"'; $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = ''; } else $validateForm=''; @@ -5812,12 +5812,12 @@ reset($value); while(list(,$Nvalue)=each($value)) { $JSPart.=" - updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',unescape('".rawurlencode($Nvalue)."'))"; + updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).")"; } } else { $JSPart.=" - updateForm('".$formName."','".$arrPrefix."[".$fKey."]',unescape('".rawurlencode($value)."'))"; + updateForm('".$formName."','".$arrPrefix."[".$fKey."]',".t3lib_div::quoteJSvalue($value, true).")"; } } $JSPart='