Community
    • Login

    CDATA is not properly rendered in html files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    cdatajavascripthtml
    2 Posts 2 Posters 2.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Carl in 't VeldC Offline
      Carl in 't Veld
      last edited by Carl in 't Veld

      <script>
      var x= ‘<Content><![CDATA[This is a first paragraph!<DIV>&nbsp;</DIV>And this is a second paragraph.]]></Content>’;
      </script>

      is not properly rendered in NotePad++ using html-styling.
      Why is that? Can I do something? Is there another html-plugin that will work correctly?

      One should expect one of the following:

      1. from opening apostrophe to closing apostrophe rendered as a string (grey by default)
      2. the phrase ‘<Content> rendered as a string and <![CDATA[ to ]]> rendered as CDATA (orange by default) and the phrase </Content>’ rendered as string.

      But now the CDATA section stops at &nbsp;. Starting from </DIV> the parser sees the remaing content as html i.e. it is rendered in blue and bold black.

      This creates lots of confusing while editing the html document.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Carl in 't Veld
        last edited by

        Hello @Carl-in-'t-Veld,

        AFAIK this how the current lexer is working.
        Don’t know of any other html lexer yet.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors