Fix error on the IDN site javascript..

To handle url on the javascript, convert the url to punycode. If not, `isSameOrigin` and return `false` when we compare `location.href` and `request_uri` even though they are same...

On the normal domain (except IDN), they are not affected by this commit.
This commit is contained in:
Min-Soo Kim 2018-05-07 01:04:34 +09:00
parent 7eed765ec5
commit 3bdc896f4e

View file

@ -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 = "{Context::encodeIdna(Context::getDefaultUrl())}";
var current_url = "{Context::encodeIdna($current_url)}";
var request_uri = "{Context::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'};