taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

Regression: Inputs with long values not parsed #158

Closed david-golightly-leapyear closed 3 years ago

david-golightly-leapyear commented 3 years ago

This worked in 4.1.4, and is broken in 4.1.5.

Given the following code:

const htmlText = `<html>
  <body>
    <form>
      <input name="SAMLResponse" value="PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJfYWQxZGUwYmY4M2Q4YzM3NGFjYTEiIFZlcnNpb249IjIuMCIgSXNzdWVJbnN0YW50PSIyMDIxLTA5LTMwVDIyOjMxOjI1WiIgRGVzdGluYXRpb249Imh0dHA6Ly9sb2NhbGhvc3Q6NDQwMS9zYW1sL2FjcyI+PHNhbWw6SXNzdWVyIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iPnVybjpleGFtcGxlOmlkcDwvc2FtbDpJc3N1ZXI+PFNpZ25hdHVyZSB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+PFNpZ25lZEluZm8+PENhbm9uaWNhbGl6YXRpb25NZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzEwL3htbC1leGMtYzE0biMiLz48U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPjxSZWZlcmVuY2UgVVJJPSIjX2FkMWRlMGJmODNkOGMzNzRhY2ExIj48VHJhbnNmb3Jtcz48VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI2VudmVsb3BlZC1zaWduYXR1cmUiLz48VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0c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aWxlUGhvbmUiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6YmFzaWMiPjxzYW1sOkF0dHJpYnV0ZVZhbHVlIHhzaTp0eXBlPSJ4czpzdHJpbmciPisxLTQxNS01NTUtNTE0MTwvc2FtbDpBdHRyaWJ1dGVWYWx1ZT48L3NhbWw6QXR0cmlidXRlPjxzYW1sOkF0dHJpYnV0ZSBOYW1lPSJncm91cHMiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6YmFzaWMiPjxzYW1sOkF0dHJpYnV0ZVZhbHVlIHhzaTp0eXBlPSJ4czpzdHJpbmciPmdyb3VwMTwvc2FtbDpBdHRyaWJ1dGVWYWx1ZT48L3NhbWw6QXR0cmlidXRlPjxzYW1sOkF0dHJpYnV0ZSBOYW1lPSJ1c2VyVHlwZSIgTmFtZUZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmF0dHJuYW1lLWZvcm1hdDpiYXNpYyI+PHNhbWw6QXR0cmlidXRlVmFsdWUgeHNpOnR5cGU9InhzOnN0cmluZyI+QWRtaW48L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJpYnV0ZT48L3NhbWw6QXR0cmlidXRlU3RhdGVtZW50Pjwvc2FtbDpBc3NlcnRpb24+PC9zYW1scDpSZXNwb25zZT4&#x3D;">
    </form>
  </body>
</html>`

const input = parse(htmlText).querySelector('input[name="SAMLResponse"]')

Expected: input should contain a reference to the parsed input element

Actual: input is null. The form element has a single TextNode child containing the raw, unparsed HTML text where the input element should be.

nonara commented 3 years ago

Unfortunately, I can't reproduce this. I pasted the exact code, but it seems to be working here.

image

Here is my exact test-case:

const { parse } = require('node-html-parser');

const htmlText = `<html>
  <body>
    <form>
      <input name="SAMLResponse" value="PHNhbWxwOlJlc3BvbnNlIHhtbG5zO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idXRlPjxzYW1sOkF0dHJpYnV0ZSBOYW1lPSJncm91cHMiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6YmFzaWMiPjxzYW1sOkF0dHJpYnV0ZVZhbHVlIHhzaTp0eXBlPSJ4czpzdHJpbmciPmdyb3VwMTwvc2FtbDpBdHRyaWJ1dGVWYWx1ZT48L3NhbWw6QXR0cmlidXRlPjxzYW1sOkF0dHJpYnV0ZSBOYW1lPSJ1c2VyVHlwZSIgTmFtZUZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmF0dHJuYW1lLWZvcm1hdDpiYXNpYyI+PHNhbWw6QXR0cmlidXRlVmFsdWUgeHNpOnR5cGU9InhzOnN0cmluZyI+QWRtaW48L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJpYnV0ZT48L3NhbWw6QXR0cmlidXRlU3RhdGVtZW50Pjwvc2FtbDpBc3NlcnRpb24+PC9zYW1scDpSZXNwb25zZT4&#x3D;">
    </form>
  </body>
</html>`

const input = parse(htmlText).querySelector('input[name="SAMLResponse"]')
console.log(input);

Try removing node_modules, clearing yarn cache, and reinstalling. I would also recommend upgrading to v5, as the matching algorithms are a bit better.

If the error persists, please setup a small reproduction repository, and I'll have a look.

david-golightly-leapyear commented 3 years ago

Hm, no, it's not node_modules etc. I narrowed it down to a minimal diff:

const htmlText = `<html>
  <body>
    <form>
      <input name="SAMLResponse"

 value="PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJfYWQxZGUwYmY4M2Q4YzM3NGFjYTEiIFZlcnNpb249IjIuMCIgSXNzdWVJbnN0YW50PSIyMDIxLTA5LTMwVDIyOjMxOjI1WiIgRGVzdGluYXRpb249Imh0dHA6Ly9sb2NhbGhvc3Q6NDQwMS9zYW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GVWYWx1ZT48L3NhbWw6QXR0cmlidXRlPjxzYW1sOkF0dHJpYnV0ZSBOYW1lPSJ1c2VyVHlwZSIgTmFtZUZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmF0dHJuYW1lLWZvcm1hdDpiYXNpYyI+PHNhbWw6QXR0cmlidXRlVmFsdWUgeHNpOnR5cGU9InhzOnN0cmluZyI+QWRtaW48L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJpYnV0ZT48L3NhbWw6QXR0cmlidXRlU3RhdGVtZW50Pjwvc2FtbDpBc3NlcnRpb24+PC9zYW1scDpSZXNwb25zZT4&#x3D;">
    </form>
  </body>
</html>`

const input = parse(htmlText).querySelector('input[name="SAMLResponse"]')

^ this fails. The only difference seems to be the newline after the name="SAMLResponse" attribute. When that newline is converted into a space, it parses successfully.

david-golightly-leapyear commented 3 years ago

However, this appears to be fixed in 5.0.0, so I'm fine closing it. Thanks!