Menu

#97 plaintext returning conjoined elements

closed
None
2018-12-08
2012-01-19
Anonymous
No

$this->html->plaintext bunches elements together, for example

I am line 1

I am line 2


will appear as
I am line 1I am line 2

I was able to address my needs by modifying line 386
WAS: $ret .= $this->convert_text($n->text());
NOW: $ret .= $this->convert_text($n->text()) .' ';

Discussion

  • Kash

    Kash - 2012-07-13

    Hi,
    I would like to work on this bug. I have done quite a work in HTML , javascript and DOM. Please elicit me with the proceedings.
    Thanks.

     
  • LogMANOriginal

    LogMANOriginal - 2018-12-08

    Thanks for reporting this issue!

    Paragraphs should in-fact be separated by a blank line according to the HTML Specification.

    I modified the script to do just that: [5d9b34]

    @Kash: I know this is a very old thread, but if you are still interested in fixing bugs, please don't hesitate to do merge requests: https://sourceforge.net/p/simplehtmldom/repository/merge-requests/

     

    Related

    Commit: [5d9b34]

  • LogMANOriginal

    LogMANOriginal - 2018-12-08
    • status: open --> closed
    • assigned_to: LogMANOriginal
     

Log in to post a comment.