Index: trunk/extensions/RPED/RPED.hooks.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | // remote wiki (Wikipedia) |
64 | 64 | if ( in_array( 'broken', $options ) || $itIsBlank == true ) { |
65 | 65 | $title = $target->getPrefixedText (); |
| 66 | + $fragment = htmlentities($target->getFragmentForURL()); |
66 | 67 | |
67 | 68 | for ( $thiscount = 0; $thiscount < strlen( $title ); $thiscount++ ) { |
68 | 69 | if ( substr( $title, $thiscount, 1 ) == ' ' ) { |
— | — | @@ -82,7 +83,7 @@ |
83 | 84 | $url = wfMsgExt( 'rped-wikipedia-url','parsemag') . $title; |
84 | 85 | |
85 | 86 | // The page that we'll link to |
86 | | - $text = '<a href="' . $url . '">' . $text . '</a>'; |
| 87 | + $text = '<a href="' . $url . $fragment. '">' . $text. '</a>'; |
87 | 88 | |
88 | 89 | if ( $wgRemoteStyle != '' ) { |
89 | 90 | $customAttribs['style'] = $wgRemoteStyle; |
Index: trunk/extensions/RPED/ApiRPED.php |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | if( isset( $myInput ) ) { |
55 | 55 | foreach( $myInput as $subValue ) { |
56 | 56 | if ( isset( $subValue ) && $subValue !== null ) { |
| 57 | + $subValue=urldecode($subValue); |
57 | 58 | $existCheck = null; |
58 | 59 | $existCheck = $dbr->selectRow( 'rped_page', 'rped_page_title', |
59 | 60 | array( 'rped_page_title' => $subValue ) ); |