Code Duplication    Length = 15-15 lines in 2 locations

htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Strategy/MakeWellFormed.php 2 locations

@@ 402-416 (lines=15) @@
399
            }
400
401
            // make sure that we have something open
402
            if (empty($this->stack)) {
403
                if ($escape_invalid_tags) {
404
                    if ($e) {
405
                        $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag to text');
406
                    }
407
                    $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token));
408
                } else {
409
                    if ($e) {
410
                        $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag removed');
411
                    }
412
                    $token = $this->remove();
413
                }
414
                $reprocess = true;
415
                continue;
416
            }
417
418
            // first, check for the simplest case: everything closes neatly.
419
            // Eventually, everything passes through here; if there are problems
@@ 461-475 (lines=15) @@
458
            }
459
460
            // we didn't find the tag, so remove
461
            if ($skipped_tags === false) {
462
                if ($escape_invalid_tags) {
463
                    if ($e) {
464
                        $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag to text');
465
                    }
466
                    $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token));
467
                } else {
468
                    if ($e) {
469
                        $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag removed');
470
                    }
471
                    $token = $this->remove();
472
                }
473
                $reprocess = true;
474
                continue;
475
            }
476
477
            // do errors, in REVERSE $j order: a,b,c with </a></b></c>
478
            $c = count($skipped_tags);