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

email-ext-plugin FILE token macro apostrophe escaping


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • email-ext-plugin
    • Email Extension Plugin 2.39, Token Macro 1.10, Jenkins 1.580.2. Windows Server 2012

      I have a job that sends an HTML e-mail with the email-ext-plugin.

      The content is configured as such :
      ${FILE, path="MyFile.html"}

      Where MyFile.html is generated from a Python script.

      There is an apostrophe in the content of the file. Before the latest update to email-ext-plugin it was displayed "'". Now it is displayed "'" in the email client (tested on OWA and Outlook).

      The change seems to be related to this line : https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/CssInliner.java#L78
      The added .escapeMode(Entities.EscapeMode.xhtml)) changes the apostrophe to it's ampersand escaped version.

      There is probably a good reason why this line was modified in the first place, but I wonder if there would be a way to make it work on my end. Maybe make the escaping mode configurable?

      Thank you

            slide_o_mix Alex Earl
            dblanchette Denis Blanchette
            1 Vote for this issue
            3 Start watching this issue