Ticket #2223: 2223_4.patch
File 2223_4.patch, 3.1 KB (added by , 15 years ago) |
---|
-
FCKeditorParser.body.php
309 309 $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text); //#2223: [[()]] => [[RTENOTITLE%1|%1]] 310 310 $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text); //change ':' => 'RTECOLON' in links 311 311 $text = parent::replaceInternalLinks($text); 312 for($i=0; $i<count($this->mLinkHolders['dbkeys']);$i++) 313 if (substr($this->mLinkHolders['dbkeys'][$i], 0, 10) == "RTENOTITLE") 314 { 315 $this->mLinkHolders['dbkeys'][$i] = "RTENOTITLE". $this->mLinkHolders['texts'][$i]; 316 $this->mLinkHolders['titles'][$i]->mPrefixedText = $this->mLinkHolders['dbkeys'][$i]; 317 $this->mLinkHolders['titles'][$i]->mFragment = ''; 318 } 319 312 320 $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text); // #2075 313 321 $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text); // remove unused RTENOTITLE 314 322 -
mw12/FCKeditorParser_OldPP.body.php
310 310 $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text); //#2223: [[()]] => [[RTENOTITLE%1|%1]] 311 311 $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text); //change ':' => 'RTECOLON' in links 312 312 $text = parent::replaceInternalLinks($text); 313 for($i=0; $i<count($this->mLinkHolders['dbkeys']);$i++) 314 if (substr($this->mLinkHolders['dbkeys'][$i], 0, 10) == "RTENOTITLE") 315 { 316 $this->mLinkHolders['dbkeys'][$i] = "RTENOTITLE". $this->mLinkHolders['texts'][$i]; 317 $this->mLinkHolders['titles'][$i]->mPrefixedText = $this->mLinkHolders['dbkeys'][$i]; 318 $this->mLinkHolders['titles'][$i]->mFragment = ''; 319 } 320 313 321 $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text); // #2075 314 322 $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text); // remove unused RTENOTITLE 315 323 -
plugins/mediawiki/fckplugin.js
370 370 if (href.toLowerCase().StartsWith( 'rtenotitle' )) 371 371 { 372 372 href = href.substring(10); 373 if ( FCKConfig.ProtectedSource.Revert(htmlNode.innerHTML, 0) == FCKConfig.ProtectedSource.Revert(href, 0) ) pipeline = false; 373 var title = FCKConfig.ProtectedSource.Revert(htmlNode.innerHTML, 0); 374 title = title.replace(/&/, "&") 375 if ( title == FCKConfig.ProtectedSource.Revert(href, 0) ) pipeline = false; 374 376 } 375 377 if (href.toLowerCase().StartsWith( 'rtecolon' )) //change 'rtecolon=' => ':' in links 376 378 {