src/View/Parsers/ShortcodeParser.php
protected function replaceAttributeTagsWithContent($htmlvalue)
    {
        $attributes = $htmlvalue->query('//@*[contains(.,"[")][contains(.,"]")]');
        $parser = $this;

        for ($i = 0; $i < $attributes->length; $i++) {
            $node = $attributes->item($i);
            $tags = $this->extractTags($node->nodeValue);
            $extra = array('node' => $node, 'element' => $node->ownerElement);

            if ($tags) {
                $node->nodeValue = $this->replaceTagsWithText(
                    htmlspecialchars($node->nodeValue),
                    $tags,
                    function ($idx, $tag) use ($parser, $extra) {
                        return $parser->getShortcodeReplacementText($tag, $extra, false);
                    }
                );
            }
        }
    }
protected function replaceAttributeTagsWithContent($htmlvalue)
    {
        $attributes = $htmlvalue->query('//@*[contains(.,"[")][contains(.,"]")]');
        $parser = $this;

        for ($i = 0; $i < $attributes->length; $i++) {
            $node = $attributes->item($i);
            $tags = $this->extractTags($node->nodeValue);
            $extra = array('node' => $node, 'element' => $node->ownerElement);

            if ($tags) {
                $node->nodeValue = $this->replaceTagsWithText(
                    htmlspecialchars($node->nodeValue),
                    $tags,
                    function ($idx, $tag) use ($parser, $extra) {
                        return $parser->getShortcodeReplacementText($tag, $extra, false);
                    }
                );
            }
        }
    }
protected function replaceAttributeTagsWithContent ( $ htmlvalue ) { $ attributes = $ htmlvalue -> query ( '//@*[contains(.,"[")][contains(.,"]")]' ) ; $ parser = $ this ; for ( $ i = 0 ; $ i < $ attributes -> length ; $ i ++ ) { $ node = $ attributes -> item ( $ i ) ; $ tags = $ this -> extractTags ( $ node -> nodeValue ) ; $ extra = array ( 'node' => $ node , 'element' => $ node -> ownerElement ) ; if ( $ tags ) { $ node -> nodeValue = $ this -> replaceTagsWithText ( htmlspecialchars ( $ node -> nodeValue ) , $ tags , function ( $ idx , $ tag ) use ( $ parser , $ extra ) { return $ parser -> getShortcodeReplacementText ( $ tag , $ extra , false ) ; } ) ; } } }
Replace the shortcodes in attribute values with the calculated content

We don't use markers with attributes because there's no point, it's easier to do all the matching
in-DOM after the XML parse

@param HTMLValue $htmlvalue
Replace the shortcodes in attribute values with the calculated content