Code Duplication    Length = 25-25 lines in 2 locations

htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/PH5P.php 2 locations

@@ 2850-2874 (lines=25) @@
2847
                    case 'menu':
2848
                    case 'ol':
2849
                    case 'pre':
2850
                    case 'ul':
2851
                        /* If the stack of open elements has an element in scope
2852
                        with the same tag name as that of the token, then generate
2853
                        implied end tags. */
2854
                        if ($this->elementInScope($token['name'])) {
2855
                            $this->generateImpliedEndTags();
2856
2857
                            /* Now, if the current node is not an element with
2858
                            the same tag name as that of the token, then this
2859
                            is a parse error. */
2860
                            // w/e
2861
2862
                            /* If the stack of open elements has an element in
2863
                            scope with the same tag name as that of the token,
2864
                            then pop elements from this stack until an element
2865
                            with that tag name has been popped from the stack. */
2866
                            for ($n = count($this->stack) - 1; $n >= 0; $n--) {
2867
                                if ($this->stack[$n]->nodeName === $token['name']) {
2868
                                    $n = -1;
2869
                                }
2870
2871
                                array_pop($this->stack);
2872
                            }
2873
                        }
2874
                        break;
2875
2876
                    /* An end tag whose tag name is "form" */
2877
                    case 'form':
@@ 2931-2955 (lines=25) @@
2928
                    /* An end tag whose tag name is "dd", "dt", or "li" */
2929
                    case 'dd':
2930
                    case 'dt':
2931
                    case 'li':
2932
                        /* If the stack of open elements has an element in scope
2933
                        whose tag name matches the tag name of the token, then
2934
                        generate implied end tags, except for elements with the
2935
                        same tag name as the token. */
2936
                        if ($this->elementInScope($token['name'])) {
2937
                            $this->generateImpliedEndTags(array($token['name']));
2938
2939
                            /* If the current node is not an element with the same
2940
                            tag name as the token, then this is a parse error. */
2941
                            // w/e
2942
2943
                            /* If the stack of open elements has an element in scope
2944
                            whose tag name matches the tag name of the token, then
2945
                            pop elements from this stack until an element with that
2946
                            tag name has been popped from the stack. */
2947
                            for ($n = count($this->stack) - 1; $n >= 0; $n--) {
2948
                                if ($this->stack[$n]->nodeName === $token['name']) {
2949
                                    $n = -1;
2950
                                }
2951
2952
                                array_pop($this->stack);
2953
                            }
2954
                        }
2955
                        break;
2956
2957
                    /* An end tag whose tag name is one of: "h1", "h2", "h3", "h4",
2958
                    "h5", "h6" */