@@ -229,9 +229,6 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
229
229
}
230
230
231
231
$ internalErrors = libxml_use_internal_errors (true );
232
- if (\LIBXML_VERSION < 20900 ) {
233
- $ disableEntities = libxml_disable_entity_loader (true );
234
- }
235
232
236
233
$ dom = new \DOMDocument ('1.0 ' , $ charset );
237
234
$ dom ->validateOnParse = true ;
@@ -241,9 +238,6 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
241
238
}
242
239
243
240
libxml_use_internal_errors ($ internalErrors );
244
- if (\LIBXML_VERSION < 20900 ) {
245
- libxml_disable_entity_loader ($ disableEntities );
246
- }
247
241
248
242
$ this ->addDocument ($ dom );
249
243
@@ -1131,9 +1125,6 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
1131
1125
$ htmlContent = $ this ->convertToHtmlEntities ($ htmlContent , $ charset );
1132
1126
1133
1127
$ internalErrors = libxml_use_internal_errors (true );
1134
- if (\LIBXML_VERSION < 20900 ) {
1135
- $ disableEntities = libxml_disable_entity_loader (true );
1136
- }
1137
1128
1138
1129
$ dom = new \DOMDocument ('1.0 ' , $ charset );
1139
1130
$ dom ->validateOnParse = true ;
@@ -1143,9 +1134,6 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
1143
1134
}
1144
1135
1145
1136
libxml_use_internal_errors ($ internalErrors );
1146
- if (\LIBXML_VERSION < 20900 ) {
1147
- libxml_disable_entity_loader ($ disableEntities );
1148
- }
1149
1137
1150
1138
return $ dom ;
1151
1139
}
0 commit comments