This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 99244 - "<" - in embedded js is invalid interpreted
Summary: "<" - in embedded js is invalid interpreted
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on: 99526
Blocks:
  Show dependency tree
 
Reported: 2007-03-28 13:38 UTC by Lukasz Grela
Modified: 2009-05-18 10:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Grela 2007-03-28 13:38:37 UTC
1) put into embedded js, below code, look at the color of indywidual letters,

  var ala = "<" + name + ">";
Comment 1 Lukasz Grela 2007-03-28 14:32:43 UTC
i.e. code below is interpreted as having syntax error because of char "<"

if (tymczWiek < 21) nieletni.push(tymczWiek);
Comment 2 Marek Fukala 2007-03-30 13:56:52 UTC
Reproducible, uff, this issue will is pretty tricky. 

The problem is that part of the javascript syntax contains a code which can also
be recognized by html lexer as html code. Since I create the javascript
embedding dynamically (html lexer has no special state for javascript),the html
lexer lexs the "javascript" tokes since it has no idea about the inner language.

The consequence is that there is a plenty of html tokes in the <script> tag
content which are actually just a garbage. However I use this garbage tokens to
create the javascript embedding.

The described problem is IMHO unsolvable (or at least seems to be to be very
tricky) the only way how to fix is to convince Hanz to fix #99526, which causes
that the javascript embeddings on the garbage html tokens are treated separately
- read the issue #99526 for more info.
Comment 3 Marek Fukala 2007-07-10 17:26:53 UTC
already fixed by fix of issue #102794