Index: trunk/extensions/ActiveAbstract/AbstractFilter.php |
— | — | @@ -184,7 +184,9 @@ |
185 | 185 | |
186 | 186 | $headers = array(); |
187 | 187 | for( $i = 1; $i < count( $secs ); $i += 2 ) { |
188 | | - $header = UtfNormal::cleanUp( preg_replace( '/^=+\s*(.*?)\s*=+/', '$1', $secs[$i] ) ); |
| 188 | + $inside = preg_replace( '/^=+\s*(.*?)\s*=+/', '$1', $secs[$i] ); |
| 189 | + $stripped = $this->_stripMarkup( $inside ); // strip internal markup and <h[1-6]> |
| 190 | + $header = UtfNormal::cleanUp( $stripped ); |
189 | 191 | $anchor = EditPage::sectionAnchor( $header ); |
190 | 192 | $url = $this->title->getFullUrl() . $anchor; |
191 | 193 | $headers[$header] = $url; |
— | — | @@ -230,9 +232,10 @@ |
231 | 233 | * @access private |
232 | 234 | */ |
233 | 235 | function _formatLink( $url, $anchor, $type ) { |
| 236 | + $maxUrlLength = 1024; // as defined in Yahoo's .xsd |
234 | 237 | return wfOpenElement( 'sublink', array( 'linktype' => $type ) ) . |
235 | 238 | wfElement( 'anchor', null, $anchor ) . |
236 | | - wfElement( 'link', null, $url ) . |
| 239 | + wfElement( 'link', null, substr( $url, 0, $maxUrlLength ) ) . |
237 | 240 | wfCloseElement( 'sublink' ) . "\n"; |
238 | 241 | } |
239 | 242 | |