- Timestamp:
- 2008-04-22 14:03:31 (6 months ago)
- Location:
- MediaWiki/trunk
- Files:
-
- 4 modified
-
FCKeditor.body.php (modified) (2 diffs)
-
FCKeditorParser.body.php (modified) (1 diff)
-
mw12/FCKeditorParser_OldPP.body.php (modified) (1 diff)
-
plugins/mediawiki/fckplugin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
MediaWiki/trunk/FCKeditor.body.php
r1929 r1941 124 124 return true; 125 125 } 126 127 public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) 128 { 129 $text = preg_match_all("/Fckmw\d+fckmw/", $text, $matches); 130 131 if (!empty($matches[0][0])) { 132 global $leaveRawTemplates; 133 if (!isset($leaveRawTemplates)) { 134 $leaveRawTemplates = array(); 135 } 136 $leaveRawTemplates = array_merge($leaveRawTemplates, $matches[0]); 137 $attribs = array_merge($attribs, $matches[0]); 138 } 139 140 return true; 141 } 126 142 127 143 public function registerHooks() { … … 139 155 $wgHooks['ParserBeforeInternalParse'][] = array($this, "onParserBeforeInternalParse"); 140 156 $wgHooks['EditPageBeforeConflictDiff'][] = array($this, 'onEditPageBeforeConflictDiff'); 157 $wgHooks['SanitizerAfterFixTagAttributes'][] = array($this, 'onSanitizerAfterFixTagAttributes'); 141 158 142 159 if ($this->debug) { -
MediaWiki/trunk/FCKeditorParser.body.php
r1884 r1941 464 464 465 465 if (!empty($this->fck_mw_strtr_span)) { 466 global $leaveRawTemplates; 467 if (!empty($leaveRawTemplates)) { 468 foreach ($leaveRawTemplates as $l) { 469 $this->fck_mw_strtr_span[$l] = substr($this->fck_mw_strtr_span[$l], 30, -7); 470 } 471 } 466 472 $parserOutput->setText(strtr($parserOutput->getText(), $this->fck_mw_strtr_span)); 467 473 } -
MediaWiki/trunk/mw12/FCKeditorParser_OldPP.body.php
r1884 r1941 464 464 465 465 if (!empty($this->fck_mw_strtr_span)) { 466 global $leaveRawTemplates; 467 if (!empty($leaveRawTemplates)) { 468 foreach ($leaveRawTemplates as $l) { 469 $this->fck_mw_strtr_span[$l] = substr($this->fck_mw_strtr_span[$l], 30, -7); 470 } 471 } 466 472 $parserOutput->setText(strtr($parserOutput->getText(), $this->fck_mw_strtr_span)); 467 473 } -
MediaWiki/trunk/plugins/mediawiki/fckplugin.js
r1930 r1941 676 676 sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined. 677 677 678 attStr += ' ' + sAttName + '="' + String(sAttValue).replace( '"', '"' ) + '"' ; 678 // leave templates 679 if ( sAttName.StartsWith( '{{' ) && sAttName.EndsWith( '}}' ) ) { 680 attStr += ' ' + sAttName ; 681 } 682 else { 683 attStr += ' ' + sAttName + '="' + String(sAttValue).replace( '"', '"' ) + '"' ; 684 } 679 685 } 680 686 }