Ticket #2223: 2223_4.patch

File 2223_4.patch, 3.1 KB (added by Artur Formella, 16 years ago)
  • FCKeditorParser.body.php

     
    309309                $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text);   //#2223: [[()]] =>      [[RTENOTITLE%1|%1]]
    310310                $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text);      //change ':' => 'RTECOLON' in links
    311311                $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
    312320                $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text);                             // #2075
    313321                $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text);                           // remove unused RTENOTITLE
    314322
  • mw12/FCKeditorParser_OldPP.body.php

     
    310310                $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text);   //#2223: [[()]] =>      [[RTENOTITLE%1|%1]]
    311311                $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text);      //change ':' => 'RTECOLON' in links
    312312                $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
    313321                $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text);                             // #2075
    314322                $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text);                           // remove unused RTENOTITLE
    315323
  • plugins/mediawiki/fckplugin.js

     
    370370                                                        if (href.toLowerCase().StartsWith( 'rtenotitle' ))
    371371                                                        {
    372372                                                                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(/&amp;/, "&")
     375                                                                if ( title == FCKConfig.ProtectedSource.Revert(href, 0) ) pipeline = false;
    374376                                                        }
    375377                                                        if (href.toLowerCase().StartsWith( 'rtecolon' ))                //change 'rtecolon=' => ':' in links
    376378                                                        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy