From 686de24f732b400e770df83b469c37bf4e6d4874 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 31 Jul 2018 23:39:26 +0200 Subject: [PATCH] nieuws: consistent url input to article parser Should be valid even if currently unused. --- nieuws.inc.php | 4 ++-- nieuws/index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.30.0