1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

Use script_src for <script src>

This commit is contained in:
Jakub Vrana
2018-01-13 16:25:11 +01:00
parent 144c7de27f
commit 9d532fc0a1
8 changed files with 34 additions and 23 deletions

View File

@@ -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