dokufreaks / plugin-blogtng

http://dokuwiki.org/plugin:blogtng
GNU General Public License v2.0
36 stars 18 forks source link

readmore in list don't close paragraph #114

Closed Klap-in closed 10 years ago

Klap-in commented 11 years ago

Readmore Link brakes HTML

It looks like that the ~~READMORE~~ breaks the well formed HTML. As it is rendered in a paragraph and everything after ~~READMORE~~ is cutoff, the paragraph is never closed.

I fixed this on my site (not online) with a quick hack in the file \lib\plugins\blogtng\helper\entry.php by adding another closing paragraph tag

$ins[] = array('p_close', array(), $last[2]); Before:

function _read_more(&$ins, $i, $open_sections, $inc_level) {
    $append_link = (is_array($ins[$i+1]) && $ins[$i+1][0] != 'document_end');
    $ins = array_slice($ins, 0, $i);
    if ($append_link) {
        $ins[] = array('p_close', array(), $last[2]);
        $last = $ins[$i-1];

After the fix:

function _read_more(&$ins, $i, $open_sections, $inc_level) {
    $append_link = (is_array($ins[$i+1]) && $ins[$i+1][0] != 'document_end');
    $ins = array_slice($ins, 0, $i);
    $ins[] = array('p_close', array(), $last[2]);
    if ($append_link) {
        $ins[] = array('p_close', array(), $last[2]);
        $last = $ins[$i-1];

–Wetty 2012-01-14

hArpanet commented 10 years ago

I think it is misleading to close these issues as 'fixed' when the fix is only being applied to a specific branch.

Rather than close the issues, could I suggest that you just comment in regard to which branch a particular fix has been applied.