Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68272

support-core creates invalid / incorrect markdown files due to lack of escaping markdown in plain text

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • support-core-plugin
    • None

      support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

      However the data from jenkisn in plain text may contain markdown characters.

      this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format *.domain.com but this results in that being added verbatim into the update-center.md file, which results in the single * which is not valid.

      e.g. non proxy hosts of *.cluster.local|*.example.com will result in the following in the markdown file

       - No Proxy Hosts: 
       * *.cluster.local
       * *.example.com
      

      the markdown in the hostname should be escaped so that it is actually

       - No Proxy Hosts: 
       * \*.cluster.local
       * \*.example.com
      

      https://github.com/jenkinsci/support-core-plugin/blob/1b50a0dfbe22352b117de282bcbd707b8b9bad40/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java#L77 for one concrete example.

          [JENKINS-68272] support-core creates invalid / incorrect markdown files due to lack of escaping markdown in plain text

          James Nord created issue -
          James Nord made changes -
          Description Original: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{*}} which is not valid.

          e.g. non proxy hosts of {{*.cluster.local|*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}
          New: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{\*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{\*}} which is not valid.

          e.g. non proxy hosts of {{*.cluster.local|*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}
          James Nord made changes -
          Description Original: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{\*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{\*}} which is not valid.

          e.g. non proxy hosts of {{*.cluster.local|*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}
          New: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{\*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{\*}} which is not valid.

          e.g. non proxy hosts of {{\*.cluster.local|\*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}
          James Nord made changes -
          Description Original: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{\*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{\*}} which is not valid.

          e.g. non proxy hosts of {{\*.cluster.local|\*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}
          New: support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.

          However the data from jenkisn in plain text may contain markdown characters.

          this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format {{\*.domain.com}} but this results in that being added verbatim into the {{update-center.md}} file, which results in the single {{\*}} which is not valid.

          e.g. non proxy hosts of {{\*.cluster.local|\*.example.com}} will result in the following in the markdown file

          {noformat}
           - No Proxy Hosts:
           * *.cluster.local
           * *.example.com
          {noformat}

          the markdown in the hostname should be escaped so that it is actually

          {noformat}
           - No Proxy Hosts:
           * \*.cluster.local
           * \*.example.com
          {noformat}


          https://github.com/jenkinsci/support-core-plugin/blob/1b50a0dfbe22352b117de282bcbd707b8b9bad40/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java#L77 for one concrete example.

          Daniel Beck added a comment -

          Could probably also be wrapped in backticks.

          Daniel Beck added a comment - Could probably also be wrapped in backticks.

          FYI allan_burdajewicz (it might impact our parser)

          Arnaud Héritier added a comment - FYI allan_burdajewicz  (it might impact our parser)
          Allan BURDAJEWICZ made changes -
          Assignee Original: Emilio Escobar [ escoem ] New: Allan BURDAJEWICZ [ allan_burdajewicz ]

            allan_burdajewicz Allan BURDAJEWICZ
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: