Skip to content

Ambiguity in parsing inside of <script> blocks  #348

@KevinCarhart

Description

@KevinCarhart

Hi Geoff and co,

For the following HTML:
<script type="text/javascript">
ua=/</g;va=/>/g;
</script>
libtidy (as called by edbrowse) reports:
'<' + '/' + letter not allowed here

So I think it's interpreting this
</g
as the first three characters of a closing HTML tag.
(FYI if you don't recognize it, what it's actually doing in the JS world is assigning a regular expression criterion to a variable. The criterion just happens to be a <, so that's how the ambiguity arises.)

This is deeply related to the famous and brain-bending issue #65 but since #65 is closed, I am posting a new one.

thanks!!
Kevin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions