trustedUrls[$url] = TRUE; parent::__construct($url, $status, $headers); } /** * Sets the target URL to a trusted URL. * * @param string $url * A trusted URL. * * @return $this */ public function setTrustedTargetUrl($url) { $this->trustedUrls[$url] = TRUE; return $this->setTargetUrl($url); } /** * {@inheritdoc} */ protected function isSafe($url) { return !empty($this->trustedUrls[$url]) || $this->isLocal($url); } }