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

Refactor hundson.MarkupText to allow replacing entire HTML body

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      The implementation of AnsiColor is quite hacky. It needs to replace the entire body of text with html (translates ansi codes that can appear anywhere inside the text to html). Unfortunately MarkupText only lets you markup the text by inserting tags in different locations, which is not practical at all since we need to delete existing text and insert tags all over the place.

      I'd like to see MarkupText refactored to allow complete replacement of the data with unencoded html. For starters, maybe a clearText() could get the job done? Generally, markuptext is trying to be too smart about markup.

      Another option could be an extension point that lets me replace the text stream with html (unencoded).

      Refactor core/src/main/java/hudson/MarkupText.java
      https://github.com/dblock/jenkins-ansicolor-plugin

            Unassigned Unassigned
            dblock Daniel Doubrovkine
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: