Index: trunk/phase3/includes/DjVuImage.php |
— | — | @@ -251,8 +251,7 @@ |
252 | 252 | wfProfileOut( 'djvutxt' ); |
253 | 253 | if( $retval == 0) { |
254 | 254 | $txt = htmlspecialchars($txt); |
255 | | - $txt = preg_replace( "/\(page\s\d*\s\d*\s\d*\s\d*\s*\"(.*?)\"\s*\)/s", "<PAGE value=\"$1\" />", $txt ); |
256 | | - $txt = preg_replace( "/\(\)/", "<PAGE value=\"\" />", $txt ); |
| 255 | + $txt = preg_replace( "/\((page\s\d*\s\d*\s\d*\s\d*\s*\"([^<]*?)\"\s*|)\)/s", "<PAGE value=\"$2\" />", $txt ); |
257 | 256 | $txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n"; |
258 | 257 | $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml ); |
259 | 258 | $xml = $xml . $txt. '</mw-djvu>' ; |