Show
Ignore:
Timestamp:
2008-03-28 16:56:36 (6 months ago)
Author:
wwalc
Message:

Fix for #1437. MW Special Tags.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • MediaWiki/trunk/mw12/FCKeditorParser_OldPP.body.php

    r1829 r1834  
    4747                $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'; 
    4848                $this->fck_mw_strtr_span_counter++; 
    49                 $this->fck_mw_strtr_span[$key] = $text; 
     49                $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text); 
    5050                return $key; 
    5151        } 
     
    5959        */ 
    6060        function fck_genericTagHook( $str, $argv, $parser ) { 
     61                if (in_array($this->fck_mw_taghook, array("ref", "math", "references"))) { 
     62                        $class = $this->fck_mw_taghook; 
     63                } 
     64                else { 
     65                        $class = "special"; 
     66                } 
     67                 
    6168                if (empty($argv)) { 
    62                         $ret = "<span class=\"fck_mw_".$this->fck_mw_taghook."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">"; 
     69                        $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">"; 
    6370                } 
    6471                else { 
    65                         $ret = "<span class=\"fck_mw_".$this->fck_mw_taghook."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\""; 
     72                        $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\""; 
    6673                        foreach ($argv as $key=>$value) { 
    6774                                $ret .= " ".$key."=\"".$value."\""; 
     
    9198        function fck_wikiTag( $tagName, $str, $argv = array()) { 
    9299                if (empty($argv)) { 
    93                         $ret = "<span class=\"fck_mw_".$tagName."\">"; 
     100                        $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">"; 
    94101                } 
    95102                else { 
    96                         $ret = "<span class=\"fck_mw_".$tagName."\""; 
     103                        $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">"; 
    97104                        foreach ($argv as $key=>$value) { 
    98105                                $ret .= " ".$key."=\"".$value."\"";