+Add compatibility with file with accent
This commit is contained in:
parent
9ca429a536
commit
d59bbb3831
@ -81,6 +81,7 @@
|
|||||||
$tree = array();
|
$tree = array();
|
||||||
$Item = array_diff(scandir($dir), array(".", ".."));
|
$Item = array_diff(scandir($dir), array(".", ".."));
|
||||||
foreach ($Item as $key => $value) {
|
foreach ($Item as $key => $value) {
|
||||||
|
$value = utf8_encode($value);
|
||||||
if (is_dir($dir . '/' . $value)) {
|
if (is_dir($dir . '/' . $value)) {
|
||||||
if (!in_array($value, $ignore['folders']))
|
if (!in_array($value, $ignore['folders']))
|
||||||
$tree[$value] = directory_tree($dir . '/' . $value, $ignore);
|
$tree[$value] = directory_tree($dir . '/' . $value, $ignore);
|
||||||
@ -169,9 +170,9 @@
|
|||||||
$page['content'] = $Parsedown->text($page['markdown']);
|
$page['content'] = $Parsedown->text($page['markdown']);
|
||||||
|
|
||||||
if ($options['breadcrumbs']) {
|
if ($options['breadcrumbs']) {
|
||||||
$page['title'] = url_to_title(get_url($file), 'Colons');
|
$page['title'] = utf8_encode(url_to_title(get_url($file), 'Colons'));
|
||||||
} else {
|
} else {
|
||||||
$page['title'] = clean_url($file, 'Title');
|
$page['title'] = utf8_encode(clean_url($file, 'Title'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/';
|
$relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/';
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
$b = explode('/', clean_url($page, "Live"));
|
$b = explode('/', clean_url($page, "Live"));
|
||||||
$output_language = $b[0];
|
$output_language = $b[0];
|
||||||
}
|
}
|
||||||
$file = clean_url_to_file($page);
|
$file = utf8_decode(clean_url_to_file($page));
|
||||||
if (!is_file($file)) $file = FALSE;
|
if (!is_file($file)) $file = FALSE;
|
||||||
return generate_page($file);
|
return generate_page($file);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user