1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

Merge pull request #5577 from JoshyPHP/ticket/16034

[ticket/16034] Fix [url=] links being incorrectly shortened
This commit is contained in:
Marc Alexander
2019-05-02 19:41:32 +02:00
2 changed files with 8 additions and 2 deletions

View File

@@ -60,8 +60,10 @@ class link_helper
$length = $end - $start;
$text = substr($parser->getText(), $start, $length);
// Create a tag that consumes the link's text
$parser->addSelfClosingTag('LINK_TEXT', $start, $length)->setAttribute('text', $text);
// Create a tag that consumes the link's text and make it depends on this tag
$link_text_tag = $parser->addSelfClosingTag('LINK_TEXT', $start, $length);
$link_text_tag->setAttribute('text', $text);
$tag->cascadeInvalidationTo($link_text_tag);
}
/**