Index: t3lib/class.t3lib_clipboard.php =================================================================== --- t3lib/class.t3lib_clipboard.php (revision 4388) +++ t3lib/class.t3lib_clipboard.php (working copy) @@ -338,18 +338,18 @@ } // Edit: if (!$this->fileMode && $elCount) { - $opt[]=''; + $opt[]=''; } // Delete: if ($elCount) { if($GLOBALS['BE_USER']->jsConfirmation(4)) { $js = " if(confirm(".$GLOBALS['LANG']->JScharCode(sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'),$elCount)).")){ - window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href); + window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href, 1); } "; } else { - $js = " window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href); "; + $js = " window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href, 1); "; } $opt[]=''; } Index: typo3/alt_shortcut.php =================================================================== --- typo3/alt_shortcut.php (revision 4388) +++ typo3/alt_shortcut.php (working copy) @@ -267,10 +267,10 @@ window.location.href="alt_shortcut.php?editShortcut="+uid; } function submitEditPage(id) { // - window.location.href="alt_shortcut.php?editPage="+top.rawurlencode(id); + window.location.href="alt_shortcut.php?editPage="+top.rawurlencode(id, 1); } function changeWorkspace(workspaceId) { // - window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencode(workspaceId); + window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencode(workspaceId, 1); } function changeWorkspacePreview(newstate) { // window.location.href="alt_shortcut.php?changeWorkspacePreview="+newstate; Index: typo3/js/backendsearch.js =================================================================== --- typo3/js/backendsearch.js (revision 4388) +++ typo3/js/backendsearch.js (working copy) @@ -123,7 +123,7 @@ * calls the actual clear cache URL using an asynchronious HTTP request */ invokeSearch: function() { - new Ajax.Request('alt_shortcut.php?ajax=1&editPage=' + top.rawurlencode($F('search-query')), { + new Ajax.Request('alt_shortcut.php?ajax=1&editPage=' + top.rawurlencode($F('search-query'), 1), { method: 'get', requestHeaders: {Accept: 'application/json'}, onSuccess: function(transport) { Index: typo3/js/workspaces.js =================================================================== --- typo3/js/workspaces.js (revision 4388) +++ typo3/js/workspaces.js (working copy) @@ -28,9 +28,9 @@ function changeWorkspace(workspaceId) { - window.location.href = 'backend.php?changeWorkspace=' + top.rawurlencode(workspaceId); + window.location.href = 'backend.php?changeWorkspace=' + top.rawurlencode(workspaceId, 1); } function changeWorkspacePreview(newstate) { window.location.href = 'backend.php?changeWorkspacePreview=' + newstate; -} \ No newline at end of file +} Index: typo3/classes/class.modulemenu.php =================================================================== --- typo3/classes/class.modulemenu.php (revision 4388) +++ typo3/classes/class.modulemenu.php (working copy) @@ -198,7 +198,7 @@ $additionalJavascript = ''; if($moduleData['parentNavigationFrameScript']) { $parentModuleName = substr($moduleData['name'], 0, strpos($moduleData['name'], '_')); - $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])"; + $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)"; } if($moduleData['link'] && $this->linkModules) { @@ -413,7 +413,7 @@ // Setting additional JavaScript if frameset script: $additionalJavascript = ''; if($subModuleData['parentNavigationFrameScript']) { - $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])"; + $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)"; } if($subModuleData['link'] && $this->linkModules) { @@ -433,7 +433,7 @@ } if(!$GLOBALS['BE_USER']->uc['condensedMode'] && $subModuleData['parentNavigationFrameScript']) { - $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])"; + $additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)"; $submoduleNavigationFrameScript = $subModuleData['navigationFrameScript'] ? $subModuleData['navigationFrameScript'] : $subModuleData['parentNavigationFrameScript']; $submoduleNavigationFrameScript = t3lib_div::resolveBackPath($submoduleNavigationFrameScript); Index: typo3/classes/class.shortcutmenu.php =================================================================== --- typo3/classes/class.shortcutmenu.php (revision 4388) +++ typo3/classes/class.shortcutmenu.php (working copy) @@ -493,7 +493,7 @@ $shortcutName = 'Shortcut'; // default name $shortcutNamePrepend = ''; - $url = urldecode(t3lib_div::_POST('url')); + $url = t3lib_div::_POST('url'); $module = t3lib_div::_POST('module'); $motherModule = t3lib_div::_POST('motherModName'); @@ -517,7 +517,7 @@ } // Lookup the title of this page and use it as default description - $pageId = $this->getLinkedPageId($url); + $pageId = $shortcut['recordid'] ? $shortcut['recordid'] : $this->getLinkedPageId($url); if(t3lib_div::testInt($pageId)) { $page = t3lib_BEfunc::getRecord('pages', $pageId); Index: typo3/backend.php =================================================================== --- typo3/backend.php (revision 4388) +++ typo3/backend.php (working copy) @@ -336,8 +336,14 @@ $this->js .= ' /** * Function similar to PHPs rawurlencode(); + * first argument: string to rawurlencode + * second argument: boolean, if set, host information will be removed */ - function rawurlencode(str) { // + function rawurlencode() { // + var str = arguments[0]; + if (arguments[1]) { + str = removeHost(str); + } var output = escape(str); output = str_replace("*","%2A", output); output = str_replace("+","%2B", output); @@ -345,8 +351,16 @@ output = str_replace("@","%40", output); return output; } - + /** + * Function to remove host information; + */ + function removeHost(str) { // + var host = "' . t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . '"; + return str_replace(host,"",str); + } + + /** * String-replace function */ function str_replace(match,replace,string) { // Index: typo3/class.alt_menu_functions.inc =================================================================== --- typo3/class.alt_menu_functions.inc (revision 4388) +++ typo3/class.alt_menu_functions.inc (working copy) @@ -288,7 +288,7 @@ // Setting additional JavaScript if frameset script: $addJS = ''; - if ($moduleInfo['navFrameScript']) {$addJS="+'&id='+top.rawurlencode(top.fsMod.recentIds['".$moduleName."'])";} + if ($moduleInfo['navFrameScript']) {$addJS="+'&id='+top.rawurlencode(top.fsMod.recentIds['".$moduleName."'], 1)";} // If there is a script to link to (and linking is not disabled. if ($link && !$dontLink) { Index: typo3/alt_clickmenu.php =================================================================== --- typo3/alt_clickmenu.php (revision 4388) +++ typo3/alt_clickmenu.php (working copy) @@ -425,7 +425,7 @@ function urlRefForCM($url,$retUrl='',$hideCM=1,$overrideLoc='') { $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); $editOnClick= ($overrideLoc ? 'var docRef='.$overrideLoc : 'var docRef=(top.content.list_frame)?top.content.list_frame:'.$loc).'; docRef.location.href=top.TS.PATH_typo3+\''.$url.'\''. - ($retUrl?"+'&".$retUrl."='+top.rawurlencode(".$this->frameLocation('docRef.document').')':'').';'. + ($retUrl?"+'&".$retUrl."='+top.rawurlencode(".$this->frameLocation('docRef.document').', 1)':'').';'. ($hideCM?'return hideCM();':''); return $editOnClick; } @@ -476,7 +476,7 @@ } else { $conf = $loc; } - $editOnClick = 'if('.$conf.'){'.$loc.'.location.href=top.TS.PATH_typo3+\''.$this->clipObj->pasteUrl($table,$uid,0).'&redirect=\'+top.rawurlencode('.$this->frameLocation($loc.'.document').'); hideCM();}'; + $editOnClick = 'if('.$conf.'){'.$loc.'.location.href=top.TS.PATH_typo3+\''.$this->clipObj->pasteUrl($table,$uid,0).'&redirect=\'+top.rawurlencode('.$this->frameLocation($loc.'.document').', 1); hideCM();}'; return $this->linkItem( $this->label('paste'.$type), @@ -678,7 +678,7 @@ if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms')) { $addParam='&editRegularContentFromId='.intval($this->iParts[1]); } else { - $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('".$pageModule."',1);"; + $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'&edit[".$table."][".$uid."]=edit".$addParam."';}"; } } if (!$editOnClick) { @@ -705,7 +705,7 @@ $loc='top.content'.(!$this->alwaysContentFrame?'.list_frame':''); $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'". ($this->listFrame? - "alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][-".$uid."]=new'": + "alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'&edit[".$table."][-".$uid."]=new'": 'db_new.php?id='.intval($uid)."'"). ';}'; @@ -733,7 +733,7 @@ } else { $conf = '1==1'; } - $editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'". + $editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'". "&cmd[".$table.']['.$uid.'][delete]=1&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}"; return $this->linkItem( @@ -799,18 +799,18 @@ * @return array Item array, element in $menuItems */ function DB_changeFlag($table, $rec, $flagField, $title, $name, $iconRelPath='gfx/') { - $uid = $rec['_ORIG_uid'] ? $rec['_ORIG_uid'] : $rec['uid']; - $editOnClick=''; - $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); - $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'". - "&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}"; + $uid = $rec['_ORIG_uid'] ? $rec['_ORIG_uid'] : $rec['uid']; + $editOnClick=''; + $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); + $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'". + "&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}"; - return $this->linkItem( - $title, - $this->excludeIcon('PH_backPath,$iconRelPath.'button_'.($rec[$flagField]?'un':'').$name.'.gif','width="11" height="10"').' alt="" />'), - $editOnClick.'return false;', - 1 - ); + return $this->linkItem( + $title, + $this->excludeIcon('PH_backPath,$iconRelPath.'button_'.($rec[$flagField]?'un':'').$name.'.gif','width="11" height="10"').' alt="" />'), + $editOnClick.'return false;', + 1 + ); } @@ -914,7 +914,7 @@ function FILE_launch($path,$script,$type,$image,$noReturnUrl=FALSE) { $loc='top.content'.(!$this->alwaysContentFrame?'.list_frame':''); - $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'".$script.'?target='.rawurlencode($path).($noReturnUrl ? "'" : "&returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")").";}"; + $editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'".$script.'?target='.rawurlencode($path).($noReturnUrl ? "'" : "&returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)").";}"; return $this->linkItem( $this->label($type), @@ -965,7 +965,7 @@ } else { $conf = '1==1'; } - $editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_file.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'". + $editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_file.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'". "&file[delete][0][data]=".rawurlencode($path).'&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}"; return $this->linkItem( @@ -994,7 +994,7 @@ } $editOnClick='if('.$conf.'){'.$loc.".location.href=top.TS.PATH_typo3+'".$this->clipObj->pasteUrl('_FILE',$path,0). - "&redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').'); hideCM();}'; + "&redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').', 1); hideCM();}'; return $this->linkItem( $this->label('pasteinto'), @@ -1082,7 +1082,7 @@ $negativeSign = ($into == 'into') ? '' : '-'; $editOnClick=''; $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); - $editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').')+"'. + $editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').', 1)+"'. '&cmd[pages]['.$srcUid.']['.$action.']='.$negativeSign.$dstUid.'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode().'";hideCM();}'; return $this->linkItem( @@ -1106,7 +1106,7 @@ function dragDrop_copymovefolder($srcPath,$dstPath,$action) { $editOnClick=''; $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); - $editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_file.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').')+"'. + $editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_file.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').', 1)+"'. '&file['.$action.'][0][data]='.$srcPath.'&file['.$action.'][0][target]='.$dstPath.'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode().'";hideCM();}'; return $this->linkItem(