HTML <a> href value formatted incorrectly within JavaScript

Sasha
2013-07-17
2013-07-18
  • Sasha

    Sasha - 2013-07-17

    UPDATE: My bad. I was trying to nest double quotes. The error was mine, not NPP.

    I just entered code in an HTML document that uses a script to write linked text. NPP seems to be interpreting the // in the URL within the JavaScript code as the start of an HTML comment, and incorrectly formatting the text that follows as a comment.
    I'm guessing this is an issue with the formatting algorithm.
    Can anyone confirm?
    Sample code that generated this issue for me:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Page Title</title>
    </head>
    <body>
    <p>
       <script>
          document.writeln("<p>Plant choices");
          document.writeln("for <a href="http://planthardiness.ars.usda.gov"> hardiness zones</a> 5a-6b</p>");
       </script>
    </p>
    </body>
    </html>
    
     
    Last edit: Sasha 2013-07-18
  • Sasha

    Sasha - 2013-07-18

    My bad. I was trying to nest double quotes. The error was mine, not NPP.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks