mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 04:11:27 +02:00
Use script_src for <script src>
This commit is contained in:
@@ -890,15 +890,13 @@ class Adminer {
|
||||
$connection->select_db(DB);
|
||||
$tables = table_status('', true);
|
||||
}
|
||||
?>
|
||||
<script src="../externals/jush/modules/jush.js"></script>
|
||||
<script src="../externals/jush/modules/jush-textarea.js"></script>
|
||||
<script src="../externals/jush/modules/jush-txt.js"></script>
|
||||
<script src="../externals/jush/modules/jush-js.js"></script>
|
||||
<?php
|
||||
echo script_src("../externals/jush/modules/jush.js");
|
||||
echo script_src("../externals/jush/modules/jush-textarea.js");
|
||||
echo script_src("../externals/jush/modules/jush-txt.js");
|
||||
echo script_src("../externals/jush/modules/jush-js.js");
|
||||
if (support("sql")) {
|
||||
echo script_src("../externals/jush/modules/jush-$jush.js");
|
||||
?>
|
||||
<script src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
|
||||
<script>
|
||||
<?php
|
||||
if ($tables) {
|
||||
|
@@ -22,8 +22,8 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
<meta name="robots" content="noindex">
|
||||
<title><?php echo $title_page; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
|
||||
<script src="../adminer/static/functions.js"></script>
|
||||
<script src="static/editing.js"></script>
|
||||
<?php echo script_src("../adminer/static/functions.js"); ?>
|
||||
<?php echo script_src("static/editing.js"); ?>
|
||||
<?php if ($adminer->head()) { ?>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
|
||||
|
@@ -90,6 +90,14 @@ function script($source, $trailing = "\n") {
|
||||
return "<script>$source</script>$trailing";
|
||||
}
|
||||
|
||||
/** Return <script src> element
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function script_src($url) {
|
||||
return "<script src='" . h($url) . "'></script>\n";
|
||||
}
|
||||
|
||||
/** Escape for HTML
|
||||
* @param string
|
||||
* @return string
|
||||
|
Reference in New Issue
Block a user