Skip to content

Commit c6786da

Browse files
committed
fix entities in text nodes and attributes
1 parent 014e9e5 commit c6786da

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Node/Text.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ public function __toString(): string
2525
return "<![CDATA[$this->contents]]>";
2626
}
2727

28-
if (!preg_match('~[\<\>]~', $this->contents)) {
29-
return $this->contents;
30-
}
31-
3228
return htmlentities($this->contents, ENT_XML1 | ENT_SUBSTITUTE, 'UTF-8', false);
3329
}
3430
}

0 commit comments

Comments
 (0)