Skip to content
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

#504@patch: Fixes XmlParser error parse with tags. #505

Conversation

Mas0nShi
Copy link
Contributor

@Mas0nShi Mas0nShi commented Jun 14, 2022

now we have perfected tag matching again...

Fixes #504

@capricorn86
Copy link
Owner

I think we need to find a solution where we turn off the parser when a <script> start tag has been found until a </script> end tag comes.

@Mas0nShi
Copy link
Contributor Author

I think we need to find a solution where we turn off the parser when a <script> start tag has been found until a </script> end tag comes.

I find the MARKUP_REGEXP maybe wrong? so i added exclusion < beacuse we can't input < and > when we declare tag..

@capricorn86
Copy link
Owner

capricorn86 commented Jun 14, 2022

Yes, this fixes this specific problem, but we still have problems in these kind of scenarios (where <div> is parsed as a start element):

<script>
   for(let i = 0; i < 10;i++) {
	    console.log('<div>');
   }
</script>

@Mas0nShi
Copy link
Contributor Author

Mas0nShi commented Jun 14, 2022

Yes, this fixes this specific problem, but we still have problems in these kind of scenarios (where <div> is parsed as a start element):

<script>
   for(let i = 0; i < 10;i++) {
	    console.log('<div>');
   }
</script>

what? I am good running when i tested this.

image

@Mas0nShi
Copy link
Contributor Author

Yes, this fixes this specific problem, but we still have problems in these kind of scenarios (where <div> is parsed as a start element):

<script>
   for(let i = 0; i < 10;i++) {
	    console.log('<div>');
   }
</script>

Maybe the problem you're talking about is #376 solves?
we had declare ChildLessElements to stop parse the next-level tags.

@capricorn86
Copy link
Owner

Yes, this fixes this specific problem, but we still have problems in these kind of scenarios (where <div> is parsed as a start element):

<script>
   for(let i = 0; i < 10;i++) {
	    console.log('<div>');
   }
</script>

Maybe the problem you're talking about is #376 solves? we had declare ChildLessElements to stop parse the next-level tags.

Yes, maybe you are right! I will make a test as well, just to be sure 🙂

Copy link
Owner

@capricorn86 capricorn86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work great! Good job! ⭐

@capricorn86 capricorn86 merged commit f9d55eb into capricorn86:master Jun 14, 2022
@Mas0nShi Mas0nShi deleted the 504-Fixes-XmlParser-error-parse-with-tags branch June 14, 2022 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XMLParser fails for script tag with JS-Code that looks like a start tag
2 participants