File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ public function render( array $data ) {
67
67
* @return DOMDocument
68
68
*/
69
69
private function parseHtml ( $ html ) {
70
- $ entityLoaderDisabled = libxml_disable_entity_loader ( true );
70
+ if ( LIBXML_VERSION < 20900 ) {
71
+ $ entityLoaderDisabled = libxml_disable_entity_loader ( true );
72
+ }
71
73
$ internalErrors = libxml_use_internal_errors ( true );
72
74
$ document = new DOMDocument ( '1.0 ' , 'UTF-8 ' );
73
75
@@ -84,7 +86,9 @@ private function parseHtml( $html ) {
84
86
85
87
// Restore previous state
86
88
libxml_use_internal_errors ( $ internalErrors );
87
- libxml_disable_entity_loader ( $ entityLoaderDisabled );
89
+ if ( LIBXML_VERSION < 20900 ) {
90
+ libxml_disable_entity_loader ( $ entityLoaderDisabled );
91
+ }
88
92
89
93
foreach ( $ errors as $ error ) {
90
94
//TODO html5 tags can fail parsing
You can’t perform that action at this time.
0 commit comments