diff --git a/src/markup/render.php b/src/markup/render.php index 0105ce2..f56bc70 100644 --- a/src/markup/render.php +++ b/src/markup/render.php @@ -1,42 +1,45 @@ $v) { + if ($v === null) { + continue; + } $v = phutil_escape_html($v); $attributes[$k] = ' '.$k.'="'.$v.'"'; } $attributes = implode('', $attributes); if ($content === null) { return '<'.$tag.$attributes.' />'; } else { return '<'.$tag.$attributes.'>'.$content.''; } } /** * @group markup */ function phutil_escape_html($string) { return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); }