node * @param Tag $tag Tag this template belongs to * @return void */ public function check(DOMElement $template, Tag $tag) { $xpath = new DOMXPath($template->ownerDocument); $node = $xpath->query('//@disable-output-escaping')->item(0); if ($node) { throw new UnsafeTemplateException("The template contains a 'disable-output-escaping' attribute", $node); } } }