$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 "<A$attrs>" . $this->getContents() . '</A>';
}