Index: t3lib/class.t3lib_parsehtml_proc.php
===================================================================
--- t3lib/class.t3lib_parsehtml_proc.php	(révision 3982)
+++ t3lib/class.t3lib_parsehtml_proc.php	(copie de travail)
@@ -648,7 +648,7 @@
 				}
 				if (!count($attribArray_copy))	{	// Only if href, target and class are the only attributes, we can alter the link!
 						// Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes):
-					$bTag='<link '.$info['url'].($attribArray['target']?' '.$attribArray['target']:(($attribArray['class'] || $attribArray['title'])?' -':'')).($attribArray['class']?' '.$attribArray['class']:($attribArray['title']?' -':'')).($attribArray['title']?' "'.$attribArray['title'].'"':'').'>';
+					$bTag='<link '.$info['url'].($info['query']?',0,'.$info['query']:'').($attribArray['target']?' '.$attribArray['target']:(($attribArray['class'] || $attribArray['title'])?' -':'')).($attribArray['class']?' '.$attribArray['class']:($attribArray['title']?' -':'')).($attribArray['title']?' "'.$attribArray['title'].'"':'').'>';
 					$eTag='</link>';
 					$blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
 				} else {	// ... otherwise store the link as a-tag.
@@ -730,7 +730,8 @@
 						}
 						$page = t3lib_BEfunc::getRecord('pages', $idPart);
 						if (is_array($page))	{	// Page must exist...
-							$href = $siteUrl.'?id='.$link_param;
+							$pairParts = t3lib_div::trimExplode(',',$link_param);
+							$href = $siteUrl.'?id='.$pairParts[0].($pairParts[2]?$pairParts[2]:'');
 						} else if(strtolower(substr($link_param, 0, 7)) == 'record:') {
 								// linkHandler - allowing links to start with "record:"
 							$href = $link_param;
@@ -1540,12 +1541,14 @@
 					$info['type']='anchor';
 				} elseif (!trim($uP['path']) || !strcmp($uP['path'],'index.php'))	{
 					$pp = explode('id=',$uP['query']);
-					$id = trim($pp[1]);
+					$parameters = explode('&', $pp[1]);
+					$id = array_shift($parameters);
 					if ($id)	{
 						$info['pageid']=$id;
 						$info['cElement']=$uP['fragment'];
 						$info['url']=$id.($info['cElement']?'#'.$info['cElement']:'');
 						$info['type']='page';
+						$info['query'] = $parameters[0]?'&'.implode('&', $parameters):'';
 					}
 				} else {
 					$info['url']=$info['relUrl'];
Index: typo3/class.browse_links.php
===================================================================
--- typo3/class.browse_links.php	(révision 3982)
+++ typo3/class.browse_links.php	(copie de travail)
@@ -709,8 +709,8 @@
 	 *
 	 * Values:
 	 * 0: form field name reference, eg. "data[tt_content][123][image]"
-	 * 1: old/unused?
-	 * 2: old/unused?
+	 * 1: htlmArea RTE parameters: editorNo:contentTypo3Language:contentTypo3Charset
+	 * 2: RTE config parameters: RTEtsConfigParams
 	 * 3: allowed types. Eg. "tt_content" or "gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai"
 	 * 4: IRRE uniqueness: target level object-id to perform actions/checks on, eg. "data[79][tt_address][1][<field>][<foreign_table>]"
 	 * 5: IRRE uniqueness: name of function in opener window that checks if element is already used, eg. "inline.checkUniqueElement"
@@ -2591,7 +2591,8 @@
 					$uP=parse_url($rel);
 					if (!trim($uP['path']))	{
 						$pp = explode('id=',$uP['query']);
-						$id = $pp[1];
+						$parameters = explode('&', $pp[1]);
+						$id = array_shift($parameters);
 						if ($id)	{
 								// Checking if the id-parameter is an alias.
 							if (!t3lib_div::testInt($id))	{
@@ -2605,6 +2606,7 @@
 							$info['pageid']=$id;
 							$info['cElement']=$uP['fragment'];
 							$info['act']='page';
+							$info['query'] = $parameters[0]?'&'.implode('&', $parameters):'';
 						}
 					}
 				}
Index: typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
===================================================================
--- typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php	(révision 3983)
+++ typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php	(copie de travail)
@@ -323,7 +323,7 @@
 			var add_title="'.($this->setTitle?'&curUrl[title]='.rawurlencode($this->setTitle):'').'";
 			var add_params="'.($this->bparams?'&bparams='.rawurlencode($this->bparams):'').'";
 
-			var cur_href="'.($this->curUrlArray['href']?$this->curUrlArray['href']:'').'";
+			var cur_href="'.($this->curUrlArray['href'] ? ($this->curUrlInfo['query'] ? substr($this->curUrlArray['href'], 0, -strlen($this->curUrlInfo['query'])) :$this->curUrlArray['href']):'').'";
 			var cur_target="'.($this->setTarget?$this->setTarget:'').'";
 			var cur_class="'.($this->setClass?$this->setClass:'').'";
 			var cur_title="'.($this->setTitle?$this->setTitle:'').'";
@@ -349,7 +349,8 @@
 			// Functions used, if the link selector is in RTE mode:
 		$JScode.='
 			function link_typo3Page(id,anchor)	{
-				var theLink = \''.$this->siteURL.'?id=\'+id+(anchor?anchor:"");
+				var parameters = document.ltargetform.query_parameters ? (document.ltargetform.query_parameters.value.charAt(0) == "&"?"":"&") + document.ltargetform.query_parameters.value : "";
+				var theLink = \''.$this->siteURL.'?id=\'+id+(anchor?anchor:"")+parameters;
 				if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
 				if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
 				if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
@@ -372,11 +373,12 @@
 				return false;
 			}
 			function link_current()	{	//
+				var parameters = document.ltargetform.query_parameters ? (document.ltargetform.query_parameters.value.charAt(0) == "&"?"":"&") + document.ltargetform.query_parameters.value : "";
 				if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
 				if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
 				if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
 				if (cur_href!="http://" && cur_href!="mailto:")	{
-					plugin.createLink(cur_href,cur_target,cur_class,cur_title);
+					plugin.createLink(cur_href + parameters,cur_target,cur_class,cur_title);
 				}
 				return false;
 			}
@@ -832,13 +834,14 @@
 
 	function addAttributesForm() {
 		$ltargetForm = '';
-			// Add page id, target, class selector box and title field:
+			// Add page id, target, class selector box, title and parameters fields:
 		$lpageId = $this->addPageIdSelector();
+		$queryParameters = $this->addQueryParametersSelector();
 		$ltarget = $this->addTargetSelector();
 		$lclass = $this->addClassSelector();
 		$ltitle = $this->addTitleSelector();
-		if ($lpageId || $ltarget || $lclass || $ltitle) {
-			$ltargetForm = $this->wrapInForm($lpageId.$ltarget.$lclass.$ltitle);
+		if ($lpageId || $queryParameters || $ltarget || $lclass || $ltitle) {
+			$ltargetForm = $this->wrapInForm($lpageId.$queryParameters.$ltarget.$lclass.$ltitle);
 		}
 		return $ltargetForm;
 	}
@@ -880,6 +883,18 @@
 						</tr>':'';
 	}
 	
+	function addQueryParametersSelector() {
+		global $LANG;
+		
+		return ($this->act == 'page' && $this->buttonConfig && is_array($this->buttonConfig['queryParametersSelector.']) && $this->buttonConfig['queryParametersSelector.']['enabled'])?'
+						<tr>
+							<td>'.$LANG->getLL('query_parameters',1).':</td>
+							<td colspan="3">
+								<input type="text" name="query_parameters" value="' . ($this->curUrlInfo['query']?$this->curUrlInfo['query']:'') . '" ' . $this->doc->formWidth(30) . ' />
+							</td>
+						</tr>':'';
+	}
+	
 	function addTargetSelector() {
 		global $LANG;
 
Index: typo3/sysext/rtehtmlarea/mod3/locallang.xml
===================================================================
--- typo3/sysext/rtehtmlarea/mod3/locallang.xml	(révision 3982)
+++ typo3/sysext/rtehtmlarea/mod3/locallang.xml	(copie de travail)
@@ -39,6 +39,7 @@
 			<label index="currentLink">Current Link</label>
 			<label index="invalidChar">ERROR: Invalid character found in file path (%s). Cannot add the file!</label>
 			<label index="page_id">Page Id</label>
+			<label index="query_parameters">Query parameters</label>
 		</languageKey>
 	</data>
 	<orig_hash type="array">
