Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6295

GroovyDoc doesn't escape angle brackets in @code and @literal tags

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.9, 2.0.8, 2.1.6
    • 2.1.7, 2.2.0-beta-2
    • GroovyDoc
    • None

    Description

      As an example see the broken HTML [1] for the CodeNarc Gradle plugin [2].

      Method setReportFile():

      a) Method Summary
      It prints "{@code reports" instead of formatting the text correctly.

      b) Method Detail
      It prints "Use reports..enabled instead." because it renders the <report-type> string directly as a tag instead of encoding it.

      See the Javadoc Documentation [3] for @code tag.

      The relevant GroovyDoc implementation is here [4].

      [1] http://www.gradle.org/docs/current/groovydoc/org/gradle/api/plugins/quality/CodeNarc.html
      [2] https://github.com/gradle/gradle/blob/master/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeNarc.groovy#L77-L86
      [3] http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#{@code}
      [4] https://github.com/groovy/groovy-core/blob/master/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java#L756

      Attachments

        Activity

          People

            pschumacher Pascal Schumacher
            rene.scheibe Rene Scheibe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: