X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/097b3e8fb39d207f826dc6db5907852b38150fd1..73bb5f61e9a41a3071c75019454f41796fb9c19c:/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() . ''; }