mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
aba6016986
26 changed files with 224 additions and 194 deletions
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* RX_VERSION is the version number of the Rhymix CMS.
|
||||
*/
|
||||
define('RX_VERSION', '2.1.29');
|
||||
define('RX_VERSION', '2.1.30');
|
||||
|
||||
/**
|
||||
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.
|
||||
|
|
|
|||
|
|
@ -207,9 +207,13 @@ class URL
|
|||
*/
|
||||
public static function encodeIdna(string $url): string
|
||||
{
|
||||
if (preg_match('@[:/#]@', $url))
|
||||
if (!preg_match('@^/(?!/)@', $url) && preg_match('@[:/#]@', $url))
|
||||
{
|
||||
$domain = parse_url($url, \PHP_URL_HOST);
|
||||
if (!$domain)
|
||||
{
|
||||
return $url;
|
||||
}
|
||||
$position = strpos($url, $domain);
|
||||
if ($position === false)
|
||||
{
|
||||
|
|
@ -243,9 +247,13 @@ class URL
|
|||
*/
|
||||
public static function decodeIdna(string $url): string
|
||||
{
|
||||
if (preg_match('@[:/#]@', $url))
|
||||
if (!preg_match('@^/(?!/)@', $url) && preg_match('@[:/#]@', $url))
|
||||
{
|
||||
$domain = parse_url($url, \PHP_URL_HOST);
|
||||
if (!$domain)
|
||||
{
|
||||
return $url;
|
||||
}
|
||||
$position = strpos($url, $domain);
|
||||
if ($position === false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue