Skip to content
Permalink
Browse files

Small tweaks

  • Loading branch information...
bloatware committed Sep 9, 2018
1 parent 18f4b29 commit 966beb904b41d08c4eba3aeb1df82da8760bf343
Showing with 5 additions and 6 deletions.
  1. +3 −2 textpattern/include/txp_section.php
  2. +2 −4 textpattern/publish.php
@@ -596,14 +596,15 @@ function section_save()
}
// Prevent non-URL characters on section names.
$in['name'] = strtolower(sanitizeForUrl($in['name']));
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
$in['name'] = $strtolower(sanitizeForUrl($in['name']), 'UTF-8');
extract($in);
$in = doSlash($in);
extract($in, EXTR_PREFIX_ALL, 'safe');
if ($name != strtolower($old_name)) {
if ($name != $strtolower($old_name, 'UTF-8')) {
if (safe_field("name", 'txp_section', "name = '$safe_name'")) {
// Invalid input. Halt all further processing (e.g. plugin event
// handlers).
@@ -586,8 +586,6 @@ function textpattern()
if ($html === false) {
txp_die(gTxt('unknown_section'), '404');
} else {
$html = trim($html);
}
// Make sure the page has an article tag if necessary.
@@ -597,7 +595,7 @@ function textpattern()
restore_error_handler();
set_headers();
echo $html;
echo ltrim($html);
callback_event('textpattern_end');
}
@@ -637,7 +635,7 @@ function output_css($s = '', $n = '', $t = '', $e = '')
$mimetype = isset($mimetypes[$extension]) ? $mimetypes[$extension] : 'text/css';
set_error_handler('tagErrorHandler');
@header('Content-Type: '.$mimetype.'; charset=utf-8');
echo get_pref('parse_css', false) ? parse_page(null, null, $css) : $css;
echo ltrim(get_pref('parse_css', false) ? parse_page(null, null, $css) : $css);
restore_error_handler();
}
}

0 comments on commit 966beb9

Please sign in to comment.
You can’t perform that action at this time.