create an article with an <hr />
anywhere prior to an <hr class="system-pagebreak" />
normal pagination
the text between the first <hr />
and the page break is stripped at render
Joomla! 3.6.5
the cause is the page splitting regular expression in the pagebreak content plugin
plugins/content/pagebreak/pagebreak.php
// Expression to search for.
$regex = '#<hr(.*)class="system-pagebreak"(.*)\/>#iU';
this regex will capture too much. for example the following html will match the pagebreak regex causing two paragraphs to be stripped at render because the first opening <hr
will match with .*
all the way to the last class="system-pagebreak" />
<hr />
<p>paragraph under first hr tag</p>
<hr />
<p>paragraph under second hr tag</p>
<hr class="system-pagebreak" />
simply correct the regular expression to use [^>]*
instead of .*
to contain the match within a single <hr...\>
instance.
// Expression to search for.
$regex = '#<hr([^>]*)class="system-pagebreak"([^>]*)\/>#iU';
Title |
|
Title |
|
Title |
|
Title |
|
Title |
|
Title |
|
@beetabonk
You referenced the wrong issue in your PR #14535
It should be issue "14531" (this one) instead of "14393"
Then a link to the correct PR occurs here automatically.
And yes, if you know already a solution you don't have to open an issue first.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-12 16:02:56 |
Closed_By | ⇒ | zero-24 |
@beetabonk i have fixed the wrong reference for you.
The other question @bertmert already answeard. If you have a fix you can directly create a PR. Only if you don't know a solution you should open a issue. Thanks! As we have a PR I'm closing here.
@beetabonk please send you changes as Pull Request agains the staging branch?
Feel free to ask any questions if you need help please also see here: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests