<?php
namespace Claromentis\Core\TextUtil\JBBCode;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"] ?: array()) + array("_7f628626dd1d55c7" . "1b1fc0932ffd1d2c" => base64_decode("aXNfYXJyYX" . "k="), "_0f7321019339ace6ad2e176" . "353d6bf0b" => base64_decode("YXJyYXlfd2F" . "saw=="));
use Claromentis\Core\TextUtil\ClaText;






class HTMLSafeVisitor implements \JBBCode\NodeVisitor
{
    protected $cla_text;
    function __construct(ClaText $cla_text)
    {
        $this->cla_text = $cla_text;
    }
    function visitDocumentElement(\JBBCode\DocumentElement $_d132f6bc4a336c5bb52dc5648a5693f0)
    {
        foreach ($_d132f6bc4a336c5bb52dc5648a5693f0->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
    function visitTextNode(\JBBCode\TextNode $_61f33b6db779a1b966e121dc5605306e)
    {
        
        
        $_61f33b6db779a1b966e121dc5605306e->setValue($this->cla_text->HtmlSafe($_61f33b6db779a1b966e121dc5605306e->getValue()));
    }
    function visitElementNode(\JBBCode\ElementNode $_b8b6707212db450b2647d7d5649478b2)
    {
        $attrs = $_b8b6707212db450b2647d7d5649478b2->getAttribute();
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_7f628626dd1d55c" . "71b1fc0932ffd1d2" . "c"]($attrs)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_0f7321019339ace6ad2e176353d" . "6bf0b"]($attrs, function (&$_ee62014f4ef50dbe8eb79b2406d87bc7) {
                $_ee62014f4ef50dbe8eb79b2406d87bc7 = $this->cla_text->HtmlSafe($_ee62014f4ef50dbe8eb79b2406d87bc7);
            });
            $_b8b6707212db450b2647d7d5649478b2->setAttribute($attrs);
        }
        
        
        
        
        
        foreach ($_b8b6707212db450b2647d7d5649478b2->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
}