Open husam-otri opened 7 years ago
@husam-otri it looks an intentional behave. https://github.com/jhy/jsoup/blob/master/src/test/java/org/jsoup/parser/HtmlParserTest.java#L512-L516 https://github.com/jhy/jsoup/commit/ee5d4dffb382e362b52af67a53dffc92cc9ced49
Why was it necessary @jhy?
mdn reference: https://developer.mozilla.org/en/docs/Web/HTML/Element/noscript
The spec has noscript just containing text content when scripting is disabled (which it is because jsoup doesn't support scripting). I could imagine disabling that check though and treating it as a regular tag.
A related issue is that .text()
on
<head>
<noscript>
<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=387891508999354&ev=PageView&noscript=1"/>
</noscript>
</head>
returns <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=387891508999354&ev=PageView&noscript=1"/>
while I would expect an empty String.
Jsoup parse incorrectly self closed tags - iframe, img - inside
for example: