mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-15 00:12:43 +09:00
Fix #1037 IDN in Javascript @misol
This commit is contained in:
parent
4f35512241
commit
83fe72be18
2 changed files with 4 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ class URL
|
|||
public static function getCurrentDomainURL($path = '/')
|
||||
{
|
||||
$proto = \RX_SSL ? 'https://' : 'http://';
|
||||
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
|
||||
$host = isset($_SERVER['HTTP_HOST']) ? self::decodeIdna($_SERVER['HTTP_HOST']) : 'localhost';
|
||||
return $proto . $host . '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
|
||||
<!-- COMMON JS VARIABLES -->
|
||||
<script>
|
||||
var default_url = "{Context::getDefaultUrl()}";
|
||||
var current_url = "{$current_url}";
|
||||
var request_uri = "{$request_uri}";
|
||||
var default_url = "{\Rhymix\Framework\URL::encodeIdna(Context::getDefaultUrl())}";
|
||||
var current_url = "{\Rhymix\Framework\URL::encodeIdna($current_url)}";
|
||||
var request_uri = "{\Rhymix\Framework\URL::encodeIdna($request_uri)}";
|
||||
var current_lang = xe.current_lang = "{$lang_type}";
|
||||
var current_mid = {json_encode($mid ?: null)};
|
||||
var http_port = {Context::get("_http_port") ?: 'null'};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue