mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
c7cc13804c
2 changed files with 8 additions and 2 deletions
|
@ -60,8 +60,10 @@ class link_helper
|
||||||
$length = $end - $start;
|
$length = $end - $start;
|
||||||
$text = substr($parser->getText(), $start, $length);
|
$text = substr($parser->getText(), $start, $length);
|
||||||
|
|
||||||
// Create a tag that consumes the link's text
|
// Create a tag that consumes the link's text and make it depends on this tag
|
||||||
$parser->addSelfClosingTag('LINK_TEXT', $start, $length)->setAttribute('text', $text);
|
$link_text_tag = $parser->addSelfClosingTag('LINK_TEXT', $start, $length);
|
||||||
|
$link_text_tag->setAttribute('text', $text);
|
||||||
|
$tag->cascadeInvalidationTo($link_text_tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -253,6 +253,10 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
|
||||||
'[url=http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/url]',
|
'[url=http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/url]',
|
||||||
'<a href="http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a>'
|
'<a href="http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a>'
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'[url=http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/url]',
|
||||||
|
'<a href="http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a>'
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'[quote="[url=http://example.org]xxx[/url]"]...[/quote]',
|
'[quote="[url=http://example.org]xxx[/url]"]...[/quote]',
|
||||||
'<blockquote><div><cite><a href="http://example.org" class="postlink">xxx</a> wrote:</cite>...</div></blockquote>'
|
'<blockquote><div><cite><a href="http://example.org" class="postlink">xxx</a> wrote:</cite>...</div></blockquote>'
|
||||||
|
|
Loading…
Add table
Reference in a new issue