1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:25:56 +00:00

cleanup javascript_tag and stylesheet_tag

This commit is contained in:
Andrew Dolgov
2021-03-08 17:39:24 +03:00
parent 28dd255c30
commit cfb4882591
4 changed files with 26 additions and 286 deletions

View File

@@ -2,7 +2,7 @@
namespace Controls;
function attributes_to_string(array $attributes) {
$rv = "";
$rv = [];
foreach ($attributes as $k => $v) {
@@ -10,10 +10,10 @@
if ($k === "disabled" && !sql_bool_to_bool($v))
continue;
$rv .= "$k=\"" . htmlspecialchars($v) . "\"";
array_push($rv, "$k=\"" . htmlspecialchars($v) . "\"");
}
return $rv;
return implode(" ", $rv);
}
// shortcut syntax (disabled)