Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
DisallowDisableOutputEscaping.php
01 <?php
02
03 /**
04 * @package s9e\TextFormatter
05 * @copyright Copyright (c) 2010-2022 The s9e authors
06 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
07 */
08 namespace s9e\TextFormatter\Configurator\TemplateChecks;
09
10 use DOMElement;
11 use DOMXPath;
12 use s9e\TextFormatter\Configurator\Exceptions\UnsafeTemplateException;
13 use s9e\TextFormatter\Configurator\Items\Tag;
14 use s9e\TextFormatter\Configurator\TemplateCheck;
15
16 class DisallowDisableOutputEscaping extends TemplateCheck
17 {
18 /**
19 * Check a template for any tag using @disable-output-escaping
20 *
21 * @param DOMElement $template <xsl:template/> node
22 * @param Tag $tag Tag this template belongs to
23 * @return void
24 */
25 public function check(DOMElement $template, Tag $tag)
26 {
27 $xpath = new DOMXPath($template->ownerDocument);
28 $node = $xpath->query('//@disable-output-escaping')->item(0);
29
30 if ($node)
31 {
32 throw new UnsafeTemplateException("The template contains a 'disable-output-escaping' attribute", $node);
33 }
34 }
35 }