From: Mischa POSLAWSKY Date: Tue, 31 Jul 2018 21:39:26 +0000 (+0200) Subject: nieuws: consistent url input to article parser X-Git-Tag: v3.6~23 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/686de24f732b400e770df83b469c37bf4e6d4874 nieuws: consistent url input to article parser Should be valid even if currently unused. --- diff --git a/nieuws.inc.php b/nieuws.inc.php index 8af5694..3f3f163 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -25,7 +25,7 @@ function shownewsarticle($url, $link = TRUE, $title = NULL) $title = sprintf( $link ? '

%s

' : '

%s

', getoutput([1 => ' '.$date.'']), - preg_replace('/\.html$/', '', $url) + $url ); return preg_replace('{

(.*?)

}', $title, $html); } @@ -37,7 +37,7 @@ function shownews($input, $limit = 1000) print "
"; ob_start(); include $url; - print shownewsarticle($url); + print shownewsarticle(preg_replace('/\.html$/', '', $url)); print "
\n\n"; if (--$limit <= 0) break; diff --git a/nieuws/index.php b/nieuws/index.php index 51cab26..d6a85e7 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -5,7 +5,7 @@ include 'nieuws.inc.php'; if ($page and !is_numeric($page)) { $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL; - print shownewsarticle($Args, FALSE, $edit); + print shownewsarticle($Page.$Args, FALSE, $edit); return 1; }