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

javadoc doesn't handle <a href='http://...'> properly in producing index pages

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b04
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      The .html that is generated for
         <a href='http://....&#39;.

      is ok for the page that contains it, but if the snippet has to be included
      in an index/summary... page, it gets mangled. As if javadoc sees
      the ' and thinks that what follows is a relative pathname - it prepends
      the current location to the http://... and creates a broken link.

      This does not occur if double quotes are used.

      As far as I can tell , the above is legal html.

      For example, see src/share/classes/org/w3c/dom/Text.java. It contains this:
      -----
       * and represents the textual content (termed <a href='http://www.w3.org/TR/2004/REC-xml-20040204#syntax&#39;&gt;character data</a> in XML) of an <code>Element</code> or <code>Attr</code>. If there is no

      -----
      Which causes this bad link:
      http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/&#39;http://www.w3.org/TR/2004/REC-xml-20040204#syntax&#39;

      in file
         http://java.sun.com/j2se/1.5.0/docs/api/index-files/index-20.html
      1. excerpt.html
        0.3 kB
        Yuri Nesterenko

        Activity

        Hide
        sseligmasunw Scott Seligman (Inactive) added a comment -
        BT2:EVALUATION

        .
        Show
        sseligmasunw Scott Seligman (Inactive) added a comment - BT2:EVALUATION .
        Hide
        yan Yuri Nesterenko (Inactive) added a comment - - edited
        tidy does report in indices some 67 occasions of the generated links like

        ... well, I don't know how to insert this garbage in the comment verbatim. Look for an attached small file.
        Show
        yan Yuri Nesterenko (Inactive) added a comment - - edited tidy does report in indices some 67 occasions of the generated links like ... well, I don't know how to insert this garbage in the comment verbatim. Look for an attached small file.
        Show
        yan Yuri Nesterenko (Inactive) added a comment - http://cr.openjdk.java.net/~yan/6457406 proposed fix
        Hide
        jjg Jonathan Gibbons added a comment -
        Proposed fix does not include a test/ (and needs one.)
        Proposed fix does unnecessary substring call.

        Confirmed that HTML 4.01 allows single-quoted strings.
        http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2
        Show
        jjg Jonathan Gibbons added a comment - Proposed fix does not include a test/ (and needs one.) Proposed fix does unnecessary substring call. Confirmed that HTML 4.01 allows single-quoted strings. http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2
        Hide
        yan Yuri Nesterenko (Inactive) added a comment - - edited
        Thanks for the review! Note that RFR is in the javadoc-dev list.
        UPD: posted a second version. Please look in the same place. For some reason mailman defers my messages for moderation, and that seems to be really manual slow work.
        Show
        yan Yuri Nesterenko (Inactive) added a comment - - edited Thanks for the review! Note that RFR is in the javadoc-dev list. UPD: posted a second version. Please look in the same place. For some reason mailman defers my messages for moderation, and that seems to be really manual slow work.
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/d40497476f1e
        User: yan
        Date: 2014-02-21 11:32:24 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/d40497476f1e User: yan Date: 2014-02-21 11:32:24 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/d40497476f1e
        User: lana
        Date: 2014-02-28 23:54:39 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/d40497476f1e User: lana Date: 2014-02-28 23:54:39 +0000

          People

          • Assignee:
            yan Yuri Nesterenko (Inactive)
            Reporter:
            jjh James Holmlund (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Imported:
              Indexed: