Lines Matching refs:tag

131 	public $tag = 'text';
166 echo str_repeat("\t", $depth) . $this->tag;
187 $string = $this->tag;
316 function find_ancestor_tag($tag)
329 $debug_object->debug_log(2, 'Current tag is: ' . $ancestor->tag);
332 if ($ancestor->tag === $tag) {
368 if ($this->tag === 'text') {
374 $debug_object->debug_log(1, 'Innertext of tag: ' . $this->tag . $text);
377 if ($this->tag === 'root') {
402 if ($this->tag !== 'br') {
412 $ret .= '</' . $this->tag . '>';
430 if (strcasecmp($this->tag, 'script') === 0) { return ''; }
431 if (strcasecmp($this->tag, 'style') === 0) { return ''; }
443 if ($n->tag === 'p') {
452 if ($n->tag === 'span') {
475 $ret = '<' . $this->tag;
568 list($tag, $id, $class, $attributes, $cmb) = $selector;
572 // Find parent closing tag if the current element doesn't have a closing
573 // tag (i.e. void element)
603 // Go throgh each element starting at this element until the end tag
604 // Note: If this element is a void tag, any previous void element is
615 if($pass && $tag === 'text' && $node->tag === 'text') {
626 // Skip if tag doesn't match
627 if ($pass && $tag !== '' && $tag !== $node->tag && $tag !== '*') {
694 if ($c->tag === $node->tag) ++$count;
733 . $node->tag
839 * <tag attr:ibute="something" > like google does.
854 * [1] - tag name
856 * Matches the tag name consisting of zero or more words, colons,
1105 if ($this->tag !== 'img') {
1109 // See if there is aheight or width attribute in the tag itself.
1161 // Look in the tag to see if there is a class or id specified that has
1379 return $this->tag;
1516 // Script tags removal now preceeds style tag removal.
1645 $this->root->tag = 'root';
1655 // Read next tag if there is no text between current position and the
1656 // next opening tag.
1701 'meta content-type tag found'
1716 // If there is a meta tag, and they don't specify the
1721 'meta content-type tag couldn\'t be parsed. using iso-8859 default.'
1822 // end tag
1828 $tag = $this->copy_until_char('>');
1831 if (($pos = strpos($tag, ' ')) !== false) {
1832 $tag = substr($tag, 0, $pos);
1835 $parent_lower = strtolower($this->parent->tag);
1836 $tag_lower = strtolower($tag);
1838 // The end tag is supposed to close the parent tag. Handle situations
1841 // Parent tag does not have to be closed necessarily (optional closing tag)
1842 // Current tag is a block tag, so it may close an ancestor
1849 // Traverse ancestors to find a matching opening tag
1852 && strtolower($this->parent->tag) !== $tag_lower
1857 // If we don't have a match add current tag as text node
1858 if (strtolower($this->parent->tag) !== $tag_lower) {
1866 return $this->as_text_node($tag);
1871 // Grandparent exists and current tag is a block tag, so our
1872 // parent doesn't have an end tag
1873 $this->parent->_[HDOM_INFO_END] = 0; // No end tag
1876 // Traverse ancestors to find a matching opening tag
1879 && strtolower($this->parent->tag) !== $tag_lower
1884 // If we don't have a match add current tag as text node
1885 if (strtolower($this->parent->tag) !== $tag_lower) {
1888 return $this->as_text_node($tag);
1891 && strtolower($this->parent->parent->tag) === $tag_lower
1892 ) { // Grandparent exists and current tag closes it
1895 } else { // Random tag, add as text node
1896 return $this->as_text_node($tag);
1900 // Set end position of parent tag to current cursor position
1911 // start tag
1915 $tag = $this->copy_until($this->token_slash); // Get tag name
1922 if (isset($tag[0]) && $tag[0] === '!') {
1923 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');
1925 if (isset($tag[2]) && $tag[1] === '-' && $tag[2] === '-') { // Comment ("<!--")
1927 $node->tag = 'comment';
1930 $node->tag = 'unknown';
1940 // The start tag cannot contain another start tag, if so add as text
1942 if ($pos = strpos($tag, '<') !== false) {
1943 $tag = '<' . substr($tag, 0, -1);
1944 $node->_[HDOM_INFO_TEXT] = $tag;
1950 // Handle invalid tag names (i.e. "<html#doc>")
1951 if (!preg_match('/^\w[\w:-]*$/', $tag)) {
1952 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
1954 // Next char is the beginning of a new tag, don't touch it.
1960 // Next char closes current tag, add and be done with it.
1967 // begin tag, add new node
1969 $tag_lower = strtolower($tag);
1970 $node->tag = ($this->lowercase) ? $tag_lower : $tag;
1975 while (isset($this->optional_closing_tags[$tag_lower][strtolower($this->parent->tag)])) {
1984 // [0] Space between tag and first attribute
2004 // Out of bounds before the tag ended
2008 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name;
2009 $node->tag = 'text';
2015 // Attributes cannot start after opening tag
2018 $node->tag = 'text';
2061 } while ($this->char !== '>' && $this->char !== '/'); // go until the tag ended
2072 if (!isset($this->self_closing_tags[strtolower($node->tag)])) {
2079 // If it's a BR tag, we need to set it's text to the default text.
2081 // since a br tag never has sub nodes, this works well.
2082 if ($node->tag === 'br') {
2146 protected function as_text_node($tag)
2150 $node->_[HDOM_INFO_TEXT] = '</' . $tag . '>';