X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/097b3e8fb39d207f826dc6db5907852b38150fd1..3d12454faf6771c71ac91dfd7f6a21f00f4d69c2:/lib/MECON/HTML/Link.php?ds=sidebyside 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() . ''; }