-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom self closing tags are not detected properly. #40
Comments
@MohideenSheikSulaiman hey there. The behaviour is correct, custom elements can't be self-closing. In this case the parser tries to guess the correct nesting of the custom elements, and you get the second Take a look here: HTML Elements Syntax. The void elements are: area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr You can put your html in a file and open it in any browser you like, chrome, firefox ..etc. All of them will behave the same. Here is chrome for example doing the same: |
@iabudiab Thanks for the info. We are using custom self-closing tags in the HTML to transfer the content between the devices. When we parse the HTML, we convert the custom tags to the defined HTML elements. So the above case creates a problem. Data loss happens. It will be better if you can provide a custom tags support along with the (The void elements are: area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr). Is it possible to provide an option to pass the custom self-closing tags as an input to the parser.? |
Hi,
I have an issue with HTML-Kit. When I parse an HTML content which has few self-closing custom tags, it is not detected properly.
Here is the sample code,
NSArray *images = [self.document querySelectorAll:@"MyTag"];
Pls, see the array results in below image
The text was updated successfully, but these errors were encountered: