Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Property.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | // FIXME: property should be collection object according to templates |
36 | 36 | // if template/field used |
37 | 37 | if ( preg_match( '/\{\{.+\}\}/s', $value . $caption ) ) { |
38 | | - $value = "{$value}|{$caption}"; |
| 38 | + $value = $value . ( $caption == '' ? '' : "|{$caption}" ); |
39 | 39 | $caption = ''; |
40 | 40 | } else { |
41 | 41 | if ( version_compare ( SMW_VERSION, '1.6', '>=' ) ) { |
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMLinkParser.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | return array( 'len' => strlen( $m[0] ), 'obj' => new WOMLinkModel( $m[1], isset( $m[3] ) ? $m[3] : '' ) ); |
27 | 27 | } |
28 | 28 | // includes/Parser.php Parser->doMagicLinks |
29 | | - $r = preg_match( '/^(?:' . wfUrlProtocols() . ')[^][<>"|\\x00-\\x20\\x7F]+/', $text, $m ); |
| 29 | + $r = preg_match( '/^(?:' . wfUrlProtocols() . ')[^][<>"|}{\\x00-\\x20\\x7F]+/', $text, $m ); |
30 | 30 | if ( $r ) { |
31 | 31 | return array( 'len' => strlen( $m[0] ), 'obj' => new WOMLinkModel( $m[0] ) ); |
32 | 32 | } |