X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/097b3e8fb39d207f826dc6db5907852b38150fd1..c3b6d911d32973953deb6f60b701ef97f705f83e:/lib/MECON/HTML/Link.php diff --git a/lib/MECON/HTML/Link.php b/lib/MECON/HTML/Link.php index c33269a..4d97b34 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() . ''; } @@ -176,9 +178,9 @@ class MECON_HTML_Link extends HTML_Common { function setGetVar($key, &$value) // ~X2C { if (is_object($value)) { - $this->attrs[$key] =& $value; + $this->_getVars[$key] =& $value; } else { - $this->attrs[$key] = $value; + $this->_getVars[$key] = $value; } } // -X2C