Menu

#514 HTML syntax: <NAME is a TAG! while body= is an attribute!!

Bug
closed-fixed
2
2024-07-22
2007-01-04
Anonymous
No

Due to the fact that Scintilla considers only one same keywords list for both TAGS and attributes both will be considered as tags or attributes.

I hope there will be a list for tags only and another list for attributes only.

Another bad bug that all tags and names when written as closure tags they are colorized normally like tags so </BR> is a normal HTML tag!! and so is </NAME>!!.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2007-01-05

    Logged In: YES
    user_id=12579
    Originator: NO

    I won't be working on this.

     
  • Neil Hodgson

    Neil Hodgson - 2007-01-05
    • milestone: --> Bug
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-accepted
     
  • Philippe Lhoste

    Philippe Lhoste - 2007-01-08

    Logged In: YES
    user_id=2556
    Originator: NO

    There are already separate lists for tags and attributes (hypertext.elements and hypertext.attributes), but their management seems strange indeed... Something could probably be improved here.
    Now, there is currently no distinction between self-contained elements (br, hr) and the others. Anyway, I can be wrong, but I believe that <br></br> is legal XHTML.
    Lot of syntax checking should be done with some other program, like Tidy. For example, Scintilla won't verify that an attribute belongs to an elements, so it will accept <p href="foo">. Likewise, it won't check proper closing of tags.
    Its syntax highlighting is a helper, not a code checker.

     
  • Colomban Wendling

    Is that still relevant? can't seem to reproduce it -- or I don't get what's the issue, not sure.

     
    • Neil Hodgson

      Neil Hodgson - 2016-08-09

      In this HTML document, the first line is incorrect since "name" is a not a valid tag but it is still shown in the valid colour since it is a valid attribute of, for example, the "img" tag. A good implementation would have separate lists of valid tags and each tag would have a list of valid attributes.

      <name imaginary="x">
      <img name="x">
      <imaginary>
      
       
  • Zufu Liu

    Zufu Liu - 2022-04-09
    • labels: Scintilla --> Scintilla, lexilla, html
     
  • Zufu Liu

    Zufu Liu - 2024-05-28

    A good implementation would have separate lists of valid tags and each tag would have a list of valid attributes.

    This is implemented in Lexilla 5.3.2.

     
  • Zufu Liu

    Zufu Liu - 2024-05-28

    I think a simple fix is just split attribute list from tag list keywords (this is what Notepad4 did):

    case 6:
        wordListN = &keywordsAttr;
        break;
    

    Also, those keywords<n> fields needs better describable names.

    Application wants better support (handle attributes for each tag) can opt-in new sub-style classfiers, and using keywordsAttr for global attributes (see https://html.spec.whatwg.org/multipage/dom.html#global-attributes).

     
    • Neil Hodgson

      Neil Hodgson - 2024-05-28

      split attribute list from tag list

      That change would not be completely compatible leading to unhighlighted attributes.

       
  • Neil Hodgson

    Neil Hodgson - 2024-07-22
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.