File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 35
35
use PHPHtmlParser \Dom \Node \HtmlNode ;
36
36
use PHPHtmlParser \Dom \Node \InnerNode ;
37
37
use PHPHtmlParser \Exceptions \CircularException ;
38
+ use PHPHtmlParser \Options ;
38
39
39
40
class Inky
40
41
{
@@ -184,11 +185,10 @@ protected function getAllComponentFactories()
184
185
public function releaseTheKraken ($ html )
185
186
{
186
187
$ dom = new Dom ();
187
- $ dom ->setOptions ([
188
- 'removeStyles ' => false ,
189
- 'removeScripts ' => false ,
190
- ]);
191
- $ dom ->load ((string ) $ html );
188
+ $ dom ->setOptions (
189
+ (new Options ())->setRemoveScripts (false )->setRemoveStyles (false )
190
+ );
191
+ $ dom ->loadStr ((string ) $ html );
192
192
193
193
$ parseCounter = 0 ;
194
194
while ($ this ->parse ($ dom )) {
@@ -201,7 +201,7 @@ public function releaseTheKraken($html)
201
201
return $ dom ->root ->outerhtml ;
202
202
}
203
203
204
- protected function clearCache (InnerNode $ node )
204
+ protected function clearCache (HtmlNode $ node )
205
205
{
206
206
foreach ($ node ->getChildren () as $ child ) {
207
207
if ($ child instanceof AbstractNode) {
You can’t perform that action at this time.
0 commit comments