r26304 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26303‎ | r26304 | r26305 >
Date:09:14, 2 October 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
"=" and "|" escaping in template printers was too eager, disabled (will be moved to a more proper place)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Template.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php
@@ -83,7 +83,8 @@
8484 }
8585 $first_col = false;
8686 }
87 - $result .= '{{' . $this->mTemplate . str_replace(array('=','|'), array('=', '|'), $wikitext) . '}}'; // encode '=' and '|' for use in templates (templates fail otherwise)
 87+ $result .= '{{' . $this->mTemplate . $wikitext . '}}';
 88+ //str_replace(array('=','|'), array('=', '|'), // encode '=' and '|' for use in templates (templates fail otherwise) -- this is not the place for doing this, since even DV-Wikitexts contain proper "|"!
8889 } else { // build simple list
8990 $first_col = true;
9091 $found_values = false; // has anything but the first column been printed?
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php
@@ -1,6 +1,6 @@
22 <?php
33 /**
4 - * Print query results in tables.
 4+ * Print query results by embeddings them into pages.
55 * @author Markus Krötzsch
66 */
77
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Template.php
@@ -51,11 +51,11 @@
5252 } else {
5353 $wikitext .= ', ';
5454 }
55 - $wikitext .= $text;
 55+ $wikitext .= $text; //str_replace(array('=','|'), array('&#x003D;', '&#x007C;'),$text); // encode '=' and '|' for use in templates (templates fail otherwise)
5656 }
5757 $firstcol = false;
5858 }
59 - $parserinput .= '{{' . $this->m_template . str_replace(array('=','|'), array('&#x003D;', '&#x007C;'), $wikitext) . '}}'; // encode '=' and '|' for use in templates (templates fail otherwise)
 59+ $parserinput .= '{{' . $this->m_template . $wikitext . '}}';
6060 }
6161 $parserOutput = $parser->parse($parserinput, $wgTitle, $parser_options);
6262 $result = $parserOutput->getText();

Status & tagging log