Menu

XML <script> tag highlight problem. Bug?

Dmitry
2008-12-09
2012-11-13
  • Dmitry

    Dmitry - 2008-12-09

    Hello.

    I type XML code as follow in notepad++ v.5.0.3:

    <root>
      <script>
        <tag1 />
        <test>12345</test>   
      </script>
    </root>

    "tag1" and "test" tags not highlighting correctly.

    Syntax option set to "XML"...

     
    • Morac

      Morac - 2009-01-07

      I'm seeing the same thing when using XML language to view XUL files in v.5.0.3.
      The moment it sees a "script" tag, it won't highlight the rest of the file correctly.

      So for example the following will highlight everything up to and including the stringbudleset line, but nothing below it:

      <script type="application/x-javascript" src="chrome://blah/content/blah1.js"/>
      <script type="application/x-javascript" src="chrome://blah/content/blah2.js"/>
         
      <stringbundleset id="stringbundleset">
      <stringbundle id="bundle_sessionmanager" src="chrome://blah/locale/blah.properties"/>
      <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
      </stringbundleset>
         
      <hbox flex="1">

      If I change the "<script" to "<script1" or "<scrip" or even "< script" everything highlights correctly.  I can also change the "/>" to a "></script>" and it will work.  It will even work if I throw in a bogus "</script>" tag right before the "<stringbundleset>" tag.

      So it seems that notepad++ doesn't understand that <script/> is a stand alone tag in XML language and is trying to find the "</script>" end tag.