Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

not detect the end of the tag <form> #350

Closed
Vitaliy-Grigoriev opened this issue Nov 10, 2015 · 0 comments
Closed

not detect the end of the tag <form> #350

Vitaliy-Grigoriev opened this issue Nov 10, 2015 · 0 comments

Comments

@Vitaliy-Grigoriev
Copy link

I stumbled on a problem that the parser can not determine the end of the tag 'form'.
Here the following code:

    size_t begin = static_cast<size_t>(elem.start_pos.offset);
    size_t end = static_cast<size_t>(elem.end_pos.offset) + elem.original_end_tag.length;

So I'm looking for the full length of the element.
But when it comes to the tag 'form', the value of the 'end' is 0. And each of his term is equal to 0.

Example of html code:

<form class="search2 i-bem" action="https://yandex.ru/search/" role="search">
    <div class="suggest2-form__node">
        <div class="search2__button">
            <button class="button button_size_xl i-bem" tabindex="-1" role="button" type="submit">
               <span class="button__text">Search</span>
            </button>
        </div>
        <div class="search2__input">
          <span class="input suggest2-form__input input_size_xl i-bem" data-bem="{&quot;input&quot;:{&quot;live&quot;:false,&quot;autoFocus&quot;:true}}">
              <span class="input__box"></span>
          </span>
        </div>        
    </div>
</form>
lifenjoiner added a commit to lifenjoiner/gethtmlX that referenced this issue Feb 14, 2022
Known issue: 'form' tag only returns startting part, google/gumbo-parser#350
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants