Skip to content

Commit d68e966

Browse files
committed
Added semicolon after &paquettg#10 for linebreak preservation.
fixes paquettg#62
1 parent 20bcd65 commit d68e966

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PHPHtmlParser/Dom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ protected function clean($str)
365365
// clean out the \n\r
366366
$replace = ' ';
367367
if ($this->options->get('preserveLineBreaks')) {
368-
$replace = '&#10';
368+
$replace = '
';
369369
}
370370
$str = str_replace(["\r\n", "\r", "\n"], $replace, $str);
371371

src/PHPHtmlParser/Dom/TextNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($text)
4141
$text = mb_ereg_replace('\s+', ' ', $text);
4242

4343
// restore line breaks
44-
$text = str_replace('&#10', "\n", $text);
44+
$text = str_replace('
', "\n", $text);
4545

4646
$this->text = $text;
4747
$this->tag = new Tag('text');

0 commit comments

Comments
 (0)