Using plain text in RT Articles for insertion on tickets

Hello,

I’m not quite sure of the right place to send this, but I hope this
might be of use to someone…

We have been using RTFM and RT Articles for a while to manage common
responses that can be included in tickets (ala canned responses, stock
answers, etc.). This saves our helpdesk staff time by allowing them to
select the appropriate Article to include on a ticket reply/creation and
having it inserted inline.

For this use of Articles we set up an “article body” custom field as
type “Fill in one textarea” (so that the Article contents are all
plaintext), configured the Articles’ classes to insert only the custom
field Value, and set the configuration value $ArticleOnTicketCreate=1.

But we ran into a couple problems using a plaintext custom field for the
article body. Any time there were angle brackets in the text (like
), they would not be included in the text inserted into tickets,
and the formatting of the article’s text by Display.html was not right
either.

I tracked this down to two files, and am submitting the attached patches
(against RT 4.0.6) for consideration. If it is possible to conditionally
enable/disable this code via a global configuration setting, it could be
possible for RT users to select whether they prefer to use plain text or
HTML in included article text.

Regards,
-Bill

Preformatted.patch (515 Bytes)

ShowCustomFields.patch (742 Bytes)