r45511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45510‎ | r45511 | r45512 >
Date:18:49, 7 January 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
More robust hack to prevent hyperlinking in Type:Code properties
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php
@@ -75,7 +75,7 @@
7676 }
7777
7878 protected function getServiceLinkParams() {
79 - // Create links to mapping services based on a wiki-editable message. The parameters
 79+ // Create links to mapping services based on a wiki-editable message. The parameters
8080 // available to the message are:
8181 // $1: urlencoded string
8282 if ( ($this->m_typeid != '_txt') && ($this->m_typeid != '_cod') ){
@@ -117,7 +117,7 @@
118118 * Special features for Type:Code formating.
119119 */
120120 protected function getCodeDisplay($value, $scroll = false) {
121 - $result = str_replace( array('<', '>', ' ', '://', '=', "'"), array('&lt;', '&gt;', '&nbsp;', '<!-- -->://<!-- -->', '&#x003D;', '&#x0027;'), $value);
 121+ $result = str_replace( array('<', '>', ' ', '://', '=', "'"), array('&lt;', '&gt;', '&nbsp;', '://<i></i>', '&#x003D;', '&#x0027;'), $value);
122122 if ($scroll) {
123123 $result = "<div style=\"height:5em; overflow:auto;\">$result</div>";
124124 }

Status & tagging log