잘못된 url을 가진 링크가 있을 경우 자바스크립트 오류가 발생되는 문제 수정

https://xetown.com/questions/1159682
This commit is contained in:
conory 2019-01-30 00:14:55 +09:00
parent ba12035106
commit 9c5fea46e5
2 changed files with 7 additions and 2 deletions

View file

@ -225,7 +225,12 @@
window.XE.baseurl = window.XE.baseurl.hostname() + window.XE.baseurl.directory();
}
var target_url = window.XE.URI(url).normalizePort().normalizeHostname().normalizePathname();
try {
var target_url = window.XE.URI(url).normalizePort().normalizeHostname().normalizePathname();
}
catch(err) {
return false;
}
if (target_url.is("urn")) {
return false;
}

View file

@ -11,7 +11,7 @@
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
<div class="x_controls">
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="7" style="min-width:80px" /> MB
<p class="x_help-block">{$lang->about_allowed_filesize}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
<p class="x_help-block">{sprintf($lang->about_allowed_filesize, getUrl('', 'module', 'admin', 'act', 'dispFileAdminConfig'))}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
</div>
</div>
<div class="x_control-group">