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 225738 - Template in script tag generates errors
Summary: Template in script tag generates errors
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 225413 225512 226709 227024 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-05 07:51 UTC by Vladimir Riha
Modified: 2013-03-15 12:01 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
lexer patch (732 bytes, patch)
2013-02-11 14:48 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-02-05 07:51:43 UTC
Please try following in PHP file:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <script type='text/template' id ='template'>
            <div>
            <%- a %>
            </div>
        </script>
    </body>
</html>


The content of <script> is underlined red with "Expected operand but found <" messages (all 3 lines). This works in HTML file (meaning no errors are displayed)



Product Version: NetBeans IDE 7.3 RC2 (Build 201302032200)
Java: 1.7.0_13; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Ondrej Brejla 2013-02-05 09:48:46 UTC
Still the same...these errors are probably caused by new JS support.
Comment 2 Petr Hejl 2013-02-11 13:46:57 UTC
*** Bug 225413 has been marked as a duplicate of this bug. ***
Comment 3 Petr Hejl 2013-02-11 14:45:55 UTC
There is imo small bug in lexer where PropertyProvider is ignored for join token. Thus the script type property is null and the block is treated as JS.
Comment 4 Petr Hejl 2013-02-11 14:48:03 UTC
Created attachment 131241 [details]
lexer patch

Lexer fix. Milo, can we apply that? All tests in lexer are passing.
Comment 5 Miloslav Metelka 2013-02-11 16:25:12 UTC
Yes, please apply it. Thanks.
Comment 6 Petr Hejl 2013-02-11 21:03:55 UTC
Fixed in web-main d5ada2d4c1e9.
Comment 7 Petr Hejl 2013-02-11 22:21:09 UTC
*** Bug 225512 has been marked as a duplicate of this bug. ***
Comment 8 Petr Hejl 2013-02-11 22:21:25 UTC
*** Bug 225538 has been marked as a duplicate of this bug. ***
Comment 9 Quality Engineering 2013-02-13 01:51:52 UTC
Integrated into 'main-golden', will be available in build *201302122300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d5ada2d4c1e9
User: Petr Hejl <phejl@netbeans.org>
Log: #225738 - Template in script tag generates errors
Comment 10 Vladimir Riha 2013-02-14 08:25:16 UTC
Verified, thanks


Product Version: NetBeans IDE Dev (Build 201302132300)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b01
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)
Comment 11 levani 2013-02-21 14:10:43 UTC
This problem still exists for me in netbeans 7.3!
Comment 12 fredgarlov00 2013-02-22 11:05:02 UTC
Confirming, still exists for me in netbeans 7.3
Comment 13 Petr Hejl 2013-02-22 11:06:50 UTC
Target milestone - the version where it is fixed is next and it is 73patch-candidate. Please do not reopen for 7.3 - TM is not 7.3.
Comment 14 Vladimir Riha 2013-02-27 07:55:28 UTC
*** Bug 226709 has been marked as a duplicate of this bug. ***
Comment 15 Vladimir Riha 2013-03-05 10:25:18 UTC
*** Bug 227024 has been marked as a duplicate of this bug. ***
Comment 16 Petr Hejl 2013-03-06 13:30:35 UTC
Transplanted to release73
e667ce670950
c46c59e477ac
Comment 17 Quality Engineering 2013-03-11 01:11:46 UTC
Integrated into 'releases', will be available in build *201303102200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/e667ce670950
User: Petr Hejl <phejl@netbeans.org>
Log: #225738 - Template in script tag generates errors
Comment 18 Vladimir Riha 2013-03-15 12:01:29 UTC
No errors displayed, verified in patch1


Product Version: NetBeans IDE 7.3 (Build 201303141828)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Linux version 3.2.0-38-generic-pae running on i386; UTF-8; en_US (nb)