Permalink
Browse files

[offline-renderer] convert %25 to '%'-character

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
1 parent 028e447 commit ad654d6e1adc002a62928390f3d93e79a9757cef @hxw hxw committed Dec 21, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 host-tools/offline-renderer/mediawiki-offline/wr_parser_sa.php
@@ -150,7 +150,7 @@ function &wfParseTextWOC($text) {
$id = strpos($temp_h, ":");
$wgTemplateFileID = trim(substr($temp_h, 0, $id));
$articleTitle = trim(substr($temp_h, $id+1));
-
+
$articleMarkup = substr($text, $nlidx + 1);
$title = Title::newFromText($articleTitle);
if (!$title) {
@@ -170,6 +170,7 @@ function &wfParseTextWOC($text) {
$articleText = preg_replace('/<p>\s*<br\s*\/>/', '<p>', $articleText);
$articleText = preg_replace('/<p>\s*<br\s*\/>/', '<p>', $articleText);
$articleText = preg_replace('/<a\s+name="([rR]eferences|[nN]otes)"\s+id="([rR]eferences|[nN]otes)"><\/a><h2>\s+<span\s+class="mw-headline">\s*([rR]eferences|[nN]otes)\s*<\/span><\/h2>\s*$/', '', $articleText);
+ $articleText = str_replace('%25', '%', $articleText);
return array( &$articleTitle, &$articleText );
}

0 comments on commit ad654d6

Please sign in to comment.