Index: trunk/extensions/SemanticFormsInputs/includes/SFI_MenuSelect.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | */ |
90 | 90 | public function getHtmlText(){ |
91 | 91 | |
92 | | - global $wgUser, $wgTitle; |
| 92 | + global $wgUser, $wgTitle, $wgParser; |
93 | 93 | global $sfigSettings; |
94 | 94 | |
95 | 95 | // first: set up HTML attributes |
— | — | @@ -113,14 +113,13 @@ |
114 | 114 | |
115 | 115 | // parse menu structure |
116 | 116 | |
117 | | - $parser = new Parser(); |
118 | | - |
119 | 117 | // FIXME: SF does not parse options correctly. Users have to replace | by {{!}} |
120 | 118 | $structure = str_replace( '{{!}}', '|', $this->mOtherArgs['structure'] ); |
121 | 119 | $options = ParserOptions::newFromUser( $wgUser ); |
122 | 120 | |
123 | | - $structure = $parser->parse( $structure, $wgTitle, $options )->getText(); |
124 | | - |
| 121 | + $structure = $wgParser->doBlockLevels( $structure, true ); |
| 122 | + $wgParser->replaceLinkHolders( $structure ); |
| 123 | + |
125 | 124 | $html .= str_replace( '<li', '<li class=\'ui-state-default\'', $structure ); |
126 | 125 | |
127 | 126 | $html .= "</span>"; |
Index: trunk/extensions/SemanticFormsInputs/libs/menuselect.js |
— | — | @@ -87,6 +87,7 @@ |
88 | 88 | res = regexp.exec( link.attr( 'href' ) ); |
89 | 89 | |
90 | 90 | title = unescape( res[1] ); |
| 91 | + title = title.replace('_', ' ', 'g'); |
91 | 92 | |
92 | 93 | link.data( 'title', title ); // save title in data |
93 | 94 | |