From 3a2fdf1d5a0f0fc369a155811ea3dc439973e46e Mon Sep 17 00:00:00 2001 From: danpros Date: Mon, 1 Mar 2021 00:36:44 +0700 Subject: [PATCH] Remove white space --- system/admin/admin.php | 4 ++-- system/admin/views/layout.html.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/system/admin/admin.php b/system/admin/admin.php index 8547a59..cb3f11c 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -92,7 +92,7 @@ function add_content($title, $tag, $url, $content, $user, $description = null, $ $post_tag = strtolower(preg_replace(array('/[^a-zA-Z0-9,. \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($pt))); $post_tagmd = safe_html($tag); $post_tag = rtrim($post_tag, ','); - $post_tagmd = rtrim($post_tagmd, ','); + $post_tagmd = preg_replace("/\s*,\s*/", ",", rtrim($post_tagmd, ',')); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $description = safe_html($description); @@ -191,7 +191,7 @@ function edit_content($title, $tag, $url, $content, $oldfile, $destination = nul $post_tag = strtolower(preg_replace(array('/[^a-zA-Z0-9,. \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($pt))); $post_tagmd = safe_html($tag); $post_tag = rtrim($post_tag, ','); - $post_tagmd = rtrim($post_tagmd, ','); + $post_tagmd = preg_replace("/\s*,\s*/", ",", rtrim($post_tagmd, ',')); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $description = safe_html($description); diff --git a/system/admin/views/layout.html.php b/system/admin/views/layout.html.php index 60a3b33..74b1e91 100644 --- a/system/admin/views/layout.html.php +++ b/system/admin/views/layout.html.php @@ -111,7 +111,6 @@ -