Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMLinkParser.php |
— | — | @@ -28,6 +28,11 @@ |
29 | 29 | if ( $r ) { |
30 | 30 | return array( 'len' => strlen( $m[0] ), 'obj' => new WOMLinkModel( $m[1], isset( $m[3] ) ? $m[3] : '' ) ); |
31 | 31 | } |
| 32 | + // FIXME: hardcode here, for fullurl magic word |
| 33 | + $r = preg_match( '/^\[(\{\{fullurl:[^}]+\}\})(\s+([^\]]+))?\]/i', $text, $m ); |
| 34 | + if ( $r ) { |
| 35 | + return array( 'len' => strlen( $m[0] ), 'obj' => new WOMLinkModel( $m[1], isset( $m[3] ) ? $m[3] : '' ) ); |
| 36 | + } |
32 | 37 | // includes/Parser.php Parser->doMagicLinks |
33 | 38 | $r = preg_match( '/^(?:' . wfUrlProtocols() . ')[^][<>"|}{\\x00-\\x20\\x7F]+/', $text, $m ); |
34 | 39 | if ( $r ) { |
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMTblCellParser.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | |
50 | 50 | $len = strlen( $m[0] ); |
51 | 51 | $text = substr( $text, $len ); |
52 | | - $r = preg_match( '/^([^\n|]*\|)[^|]/', $text, $m1 ); |
| 52 | + $r = preg_match( '/^([^<\n|]*\|)[^|]/', $text, $m1 ); |
53 | 53 | if ( !$r || preg_match( '/\{\{/', $m1[1] ) ) { |
54 | 54 | // FIXME: what if matched style contains '{{', just think it is table body |
55 | 55 | return array( 'len' => $len, 'obj' => new WOMTableCellModel( $m[0] ) ); |
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_NestProperty.php |
— | — | @@ -54,14 +54,14 @@ |
55 | 55 | } |
56 | 56 | return implode( '|', $text ); |
57 | 57 | } |
58 | | - |
| 58 | + |
59 | 59 | public function getPropertyValue() { |
60 | 60 | if ( count ( $this->m_objects ) > 0 ) |
61 | 61 | return $this->m_objects[0]->getWikiText(); |
62 | 62 | |
63 | 63 | return ''; |
64 | 64 | } |
65 | | - |
| 65 | + |
66 | 66 | public function getCaption() { |
67 | 67 | $text = array(); |
68 | 68 | $first = true; |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | } |
76 | 76 | return implode( '|', $text ); |
77 | 77 | } |
78 | | - |
| 78 | + |
79 | 79 | public function setXMLAttribute( $key, $value ) { |
80 | 80 | if ( $value == '' ) throw new MWException( __METHOD__ . ": value cannot be empty" ); |
81 | 81 | |
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Link.php |
— | — | @@ -22,6 +22,9 @@ |
23 | 23 | if ( preg_match( '/^(?:' . wfUrlProtocols() . ')[^][<>"\\x00-\\x20\\x7F]+/', $this->m_link ) ) |
24 | 24 | return false; |
25 | 25 | |
| 26 | + if ( preg_match( '/^\{\{fullurl:/i', $this->m_link ) ) |
| 27 | + return false; |
| 28 | + |
26 | 29 | return true; |
27 | 30 | } |
28 | 31 | public function getLink() { |