X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/097b3e8fb39d207f826dc6db5907852b38150fd1..863a0c89dca626c59bf859244568d598371fc957:/lib/MECON/HTML/Link.php diff --git a/lib/MECON/HTML/Link.php b/lib/MECON/HTML/Link.php index c33269a..faadfc7 100644 --- a/lib/MECON/HTML/Link.php +++ b/lib/MECON/HTML/Link.php @@ -126,10 +126,12 @@ class MECON_HTML_Link extends HTML_Common { $vars[] = urlencode($var) . '=' . urlencode($v); } if ($vars) { - $val = '?' . join('&', $vars); + $val .= '?' . join('&', $vars); } + } else { + $val = htmlentities($val); } - $attrs .= ' ' . $key . '="' . htmlentities($val) . '"'; + $attrs .= ' ' . $key . '="' . $val . '"'; } return "" . $this->getContents() . ''; }