Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8183251

Meta "keywords" tag malformed in overview-summary.html and related pages

    XMLWordPrintable

Details

    • 9
    • b177
    • Not verified

    Backports

      Description

        The recent change to simplify the text on the javadoc API overview page
        has had some bad side-effects.

        This is the changeset:
        http://hg.openjdk.java.net/jdk9/dev/rev/7df4f16bfa8f

        And these are some of the changed lines:

        -JDK_SHORT_NAME := JDK™ $(VERSION_SPECIFICATION)
        -JDK_LONG_NAME := Standard Edition Development Kit (JDK™) $(VERSION_SPECIFICATION)
        +JDK_SHORT_NAME := Java SE $(VERSION_SPECIFICATION) & JDK $(VERSION_SPECIFICATION)
        +JDK_LONG_NAME := Java<sup>&reg;</sup> Platform, Standard Edition \
        + <span style="white-space: nowrap;">&amp; Java Development Kit</span>

        - $1_HEADER_TITLE := <strong>$$(JAVA_PLATFORM)<br>$$($1_SHORT_NAME)</strong> \
        - $$(DRAFT_MARKER_STR)
        + ifeq ($(VERSION_IS_GA), true) # Workaround stylesheet bug
        + $1_HEADER_PAD := 14
        + else
        + $1_HEADER_PAD := 9
        + endif
        + $1_HEADER_TITLE := <div style="margin-top: $$($1_HEADER_PAD)px;"><strong>$$($1_SHORT_NAME)</strong> \
        + $$(DRAFT_MARKER_STR)</div>

        Now look at how they're showing up in some of the HTML pages:

        <meta name="keywords" content="Overview List,
        Java&lt;sup&gt;&amp;reg;&lt;/sup&gt; Platform, Standard Edition &lt;span
        style="white-space: nowrap;"&gt;&amp;amp; Java Development
        Kit&lt;/span&gt;&lt;br&gt;Version 9 API Specification">

        If it were just encoding the HTML, that would be ugly but acceptable.
        What's worse is that it is /not/ encoding the string quotes, meaning the
        strings are resolved as follows (if you can see colored text)

        <meta name="keywords" content="Overview List,
        Java&lt;sup&gt;&amp;reg;&lt;/sup&gt; Platform, Standard Edition &lt;span
        style="white-space: nowrap;"&gt;&amp;amp; Java Development
        Kit&lt;/span&gt;&lt;br&gt;Version 9 API Specification">

        And that is causing the tidy program to report errors such as the following:

        $ tidy -e
        /w/jjg/work/dev/build/linux-x86_64-normal-server-release/images/docs/api/jdk.charsets-frame.html
        line 8 column 1 - Warning: <meta> attribute "nowrap;"&gt;&amp;amp;"
        lacks value
        line 8 column 1 - Warning: <meta> attribute
        "kit&lt;/span&gt;&lt;br&gt;version" lacks value
        line 8 column 1 - Warning: <meta> attribute "9" lacks value
        line 8 column 1 - Warning: <meta> attribute with missing trailing quote mark
        line 21 column 84 - Warning: <div> isn't allowed in <h1> elements
        line 21 column 1 - Info: <h1> previously mentioned
        line 21 column 206 - Warning: discarding unexpected </div>
        line 8 column 1 - Warning: <meta> proprietary attribute "white-space:"
        line 8 column 1 - Warning: <meta> proprietary attribute "java"
        line 8 column 1 - Warning: <meta> proprietary attribute "development"
        line 8 column 1 - Warning: <meta> proprietary attribute "api"
        Info: Document content looks like HTML5
        Tidy found 10 warnings and 0 errors!

        Attachments

          Issue Links

            Activity

              People

                mr Mark Reinhold
                mr Mark Reinhold
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: