Lines Matching refs:tag

134 	public $tag = 'text';
169 echo str_repeat("\t", $depth) . $this->tag;
190 $string = $this->tag;
319 function find_ancestor_tag($tag)
332 $debug_object->debug_log(2, 'Current tag is: ' . $ancestor->tag);
335 if ($ancestor->tag === $tag) {
371 if ($this->tag === 'text') {
377 $debug_object->debug_log(1, 'Innertext of tag: ' . $this->tag . $text);
380 if ($this->tag === 'root') {
405 if ($this->tag !== 'br') {
415 $ret .= '</' . $this->tag . '>';
433 if (strcasecmp($this->tag, 'script') === 0) { return ''; }
434 if (strcasecmp($this->tag, 'style') === 0) { return ''; }
446 if ($n->tag === 'p') {
455 if ($n->tag === 'span') {
478 $ret = '<' . $this->tag;
571 list($tag, $id, $class, $attributes, $cmb) = $selector;
575 // Find parent closing tag if the current element doesn't have a closing
576 // tag (i.e. void element)
606 // Go throgh each element starting at this element until the end tag
607 // Note: If this element is a void tag, any previous void element is
622 // Skip if tag doesn't match
623 if ($pass && $tag !== '' && $tag !== $node->tag && $tag !== '*') {
690 if ($c->tag === $node->tag) ++$count;
729 . $node->tag
835 * <tag attr:ibute="something" > like google does.
850 * [1] - tag name
852 * Matches the tag name consisting of zero or more words, colons,
1101 if ($this->tag !== 'img') {
1105 // See if there is aheight or width attribute in the tag itself.
1157 // Look in the tag to see if there is a class or id specified that has
1375 return $this->tag;
1510 // Script tags removal now preceeds style tag removal.
1639 $this->root->tag = 'root';
1649 // Read next tag if there is no text between current position and the
1650 // next opening tag.
1695 'meta content-type tag found'
1710 // If there is a meta tag, and they don't specify the
1715 'meta content-type tag couldn\'t be parsed. using iso-8859 default.'
1816 // end tag
1822 $tag = $this->copy_until_char('>');
1825 if (($pos = strpos($tag, ' ')) !== false) {
1826 $tag = substr($tag, 0, $pos);
1829 $parent_lower = strtolower($this->parent->tag);
1830 $tag_lower = strtolower($tag);
1832 // The end tag is supposed to close the parent tag. Handle situations
1835 // Parent tag does not have to be closed necessarily (optional closing tag)
1836 // Current tag is a block tag, so it may close an ancestor
1843 // Traverse ancestors to find a matching opening tag
1846 && strtolower($this->parent->tag) !== $tag_lower
1851 // If we don't have a match add current tag as text node
1852 if (strtolower($this->parent->tag) !== $tag_lower) {
1860 return $this->as_text_node($tag);
1865 // Grandparent exists and current tag is a block tag, so our
1866 // parent doesn't have an end tag
1867 $this->parent->_[HDOM_INFO_END] = 0; // No end tag
1870 // Traverse ancestors to find a matching opening tag
1873 && strtolower($this->parent->tag) !== $tag_lower
1878 // If we don't have a match add current tag as text node
1879 if (strtolower($this->parent->tag) !== $tag_lower) {
1882 return $this->as_text_node($tag);
1885 && strtolower($this->parent->parent->tag) === $tag_lower
1886 ) { // Grandparent exists and current tag closes it
1889 } else { // Random tag, add as text node
1890 return $this->as_text_node($tag);
1894 // Set end position of parent tag to current cursor position
1905 // start tag
1909 $tag = $this->copy_until($this->token_slash); // Get tag name
1916 if (isset($tag[0]) && $tag[0] === '!') {
1917 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');
1919 if (isset($tag[2]) && $tag[1] === '-' && $tag[2] === '-') { // Comment ("<!--")
1921 $node->tag = 'comment';
1924 $node->tag = 'unknown';
1934 // The start tag cannot contain another start tag, if so add as text
1936 if ($pos = strpos($tag, '<') !== false) {
1937 $tag = '<' . substr($tag, 0, -1);
1938 $node->_[HDOM_INFO_TEXT] = $tag;
1944 // Handle invalid tag names (i.e. "<html#doc>")
1945 if (!preg_match('/^\w[\w:-]*$/', $tag)) {
1946 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
1948 // Next char is the beginning of a new tag, don't touch it.
1954 // Next char closes current tag, add and be done with it.
1961 // begin tag, add new node
1963 $tag_lower = strtolower($tag);
1964 $node->tag = ($this->lowercase) ? $tag_lower : $tag;
1969 while (isset($this->optional_closing_tags[$tag_lower][strtolower($this->parent->tag)])) {
1978 // [0] Space between tag and first attribute
1998 // Out of bounds before the tag ended
2002 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name;
2003 $node->tag = 'text';
2009 // Attributes cannot start after opening tag
2012 $node->tag = 'text';
2055 } while ($this->char !== '>' && $this->char !== '/'); // go until the tag ended
2066 if (!isset($this->self_closing_tags[strtolower($node->tag)])) {
2073 // If it's a BR tag, we need to set it's text to the default text.
2075 // since a br tag never has sub nodes, this works well.
2076 if ($node->tag === 'br') {
2140 protected function as_text_node($tag)
2144 $node->_[HDOM_INFO_TEXT] = '</' . $tag . '>';