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 216420 - </script> in javascript string breaks editor
Summary: </script> in javascript string breaks editor
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P4 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 214060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-06 07:01 UTC by Vladimir Riha
Modified: 2014-10-06 13:26 UTC (History)
3 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 Vladimir Riha 2012-08-06 07:01:30 UTC
Try following:


function loadScript(src){          
            $("document").append("<script src='"+src+"'></script>");
}

The terminating </script> causes errors and it is incorrectly recognized as HTML tag


Product Version: NetBeans IDE Dev (Build EaselCSS-441-on-20120805)
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b09
System: Linux version 3.0.0-23-generic running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-08-06 10:05:24 UTC
reproducible in HTML files, not in JavaScript files
Comment 2 Martin Fousek 2012-09-15 05:53:58 UTC
This looks to me like HTML lexer/embedding issue - am I right, Marek?
Comment 3 Marek Fukala 2012-09-19 14:33:51 UTC
reproducible - the html lexer doesn't interpret the content of the script so it doesn't know the </script> is a part of a string.
Comment 4 Marek Fukala 2012-10-09 12:35:42 UTC
*** Bug 214060 has been marked as a duplicate of this bug. ***