-
Notifications
You must be signed in to change notification settings - Fork 20
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
wrongly parses tags inside <script>
element
#62
Comments
I ran into this myself. It appears to be eat any <script>
$(function() {
var imgs = document.getElementsByTagName('img');
var errors = 0;
for(var i=0,j=imgs.length;i<j;i++){
imgs[i].onerror = function(e){
this.src = "assets/error.gif";
this.parentElement.parentElement.className = "danger";
this.onerror = function(e){};
};
errors++;
}
});
</script> Tag(HTMLTag { _name: Bytes("script"), _attributes: Attributes { raw: InlineHashMap(InlineHashMap<0 items>), id: None, class: None }, _children: InlineVec(InlineVec<3 items>), _raw: Bytes("<script>") })
Raw(Bytes("\n $(function() {\n var imgs = document.getElementsByTagName('img');\n var errors = 0;\n for(var i=0,j=imgs.length;i"))
Raw(Bytes("script>\n")) |
Yeah, I initially thought that supporting For instance, But (at least according to some testing in the browser) turns out that this isn't really needed. Even |
thanks for the library! truly appreciate it!
the parser currently incorrectly finds tags inside of
<script>
elements, so for example:will produce a
<p>
html tag inside the script tag.The text was updated successfully, but these errors were encountered: