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

Linkify multiple URLs in a single description

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Ubuntu Server 9.04

      When setting the description, I'd really like to be able to add multiple URL links (or set a description in which a URL makes up just one part of a larger block of text).

      Currently DescriptionSetterPublisher#urlify only works if the entire description is a URL, it can't urlify smaller parts of the description.

      Maybe a simple replace based on a regex pattern like:
      http://www.geekzilla.co.uk/view2D3B0109-C1B2-4B4E-BFFD-E8088CBC85FD.htm ?

          [JENKINS-6232] Linkify multiple URLs in a single description

          japher added a comment - - edited

          See attached JENKINS-6232.patch which contains change to DescriptionSetterPublisher.java to linkify multiple URLs in a single description (via regex).

          I've written the regex according to the rules in RFC 1738, so it should parse any valid URL (which is an improvement on the link I gave in the comment above).

          Apologies, I couldn't get the test environment to work correctly so I couldn't successfully update/run the unit test. Should be a very simple test case to add though (and of course all existing tests, including the URL based test, will still pass).

          Hope this can be included in the next version!

          japher added a comment - - edited See attached JENKINS-6232 .patch which contains change to DescriptionSetterPublisher.java to linkify multiple URLs in a single description (via regex). I've written the regex according to the rules in RFC 1738, so it should parse any valid URL (which is an improvement on the link I gave in the comment above). Apologies, I couldn't get the test environment to work correctly so I couldn't successfully update/run the unit test. Should be a very simple test case to add though (and of course all existing tests, including the URL based test, will still pass). Hope this can be included in the next version!

          japher added a comment -

          Sorry, new updated patch attached (had made urlify public temporarily to run my own unit tests, this is now fixed).

          japher added a comment - Sorry, new updated patch attached (had made urlify public temporarily to run my own unit tests, this is now fixed).

            huybrechts huybrechts
            japher japher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: