html5lib/html5lib-tests

Question/Issue about a test in tests18.dat

syjer opened this issue · 3 comments

syjer commented

Hi, recently, in tests18.dat the following test has been added in the commit (5fca014#diff-80f44ad8658d9cc87ce967f7514ebf8dR227):

#data
<!doctype html><template><plaintext>a</template>b
#errors
49: End of file seen and there were open elements.
36: Unclosed element “plaintext”.
25: Unclosed element “template”.
#document
| <!DOCTYPE html>
| <html>
|   <head>
|     <template>
|       <plaintext>
|         "a</template>b"
|   <body>

Maybe I'm mistaken, but the "content" string is missing for the template element? (like all the others tests with a template element and as described in the README ("Template contents are represented by the string "content" with the children below it."))

The expected result should be:

| <!DOCTYPE html>
| <html>
|   <head>
|     <template>
|       content
|         <plaintext>
|           "a</template>b"
|   <body>

instead?

Or am I missing something, and there is a specific reason that the "content" string is missing?

Thank you.

@zcorpan this looks like a bug to me? (your test, from #87)

Yep, I was not aware of the content string. parsetree doesn't emit that, either. @sideshowbarker ?

@syjer are you interested in fixing this?

syjer commented

@zcorpan sure, I'll provide a pull request asap :)