Escaping '<' and '>' in comments/replies and canned responses

I’ve run into several issues in RT with the use of greater than ‘>’ and
less than ‘<’ symbols in RT.

One issue that I run into with some regularity is pasting the default mysql
prompt into a ticket. For example, if I paste the following into a reply:

mysql> select CURRENT_DATE;
| CURRENT_DATE |
| 2016-04-20 |
1 row in set (0.00 sec)

The first line is hidden, as if it were text quoted from a previous comment
or reply.

By and large, I simply try to avoid using un-paired ‘<’ and ‘>’ characters
in replies, but I just ran into the following issue in a canned response:

The following text in the canned response editor:

“<<biblio.title>>” by <<biblio.author>>, <<issues.date_due>>,
Barcode: <<items.barcode>>

Renders as

“<>” by <>, <>, Barcode: <>

When I view it in Display.

I tried using ‘<’ and ‘>’ to escape the greater than and less than
symbols; that didn’t work… using html entities did work, but … meh.

Are there any rules for escaping ‘<’ and ‘>’, and, more generally, is there
any documentation about how RT renders comments/replies and articles?

Thanks,

–Barton

In a further twist, html entities display correctly on the “Article
Display” page, but when the canned response is actually used, I see
html entities in the reply editor… but if I include text like ,
‘foo’ is removed in the reply editor… I have no way of including
something that looks like an xml tag in a canned response.On Wed, Apr 20, 2016 at 8:56 AM, Barton Chittenden < barton@bywatersolutions.com> wrote:

I’ve run into several issues in RT with the use of greater than ‘>’ and
less than ‘<’ symbols in RT.

One issue that I run into with some regularity is pasting the default
mysql prompt into a ticket. For example, if I paste the following into a
reply:

mysql> select CURRENT_DATE;
±-------------+
| CURRENT_DATE |
±-------------+
| 2016-04-20 |
±-------------+
1 row in set (0.00 sec)

The first line is hidden, as if it were text quoted from a previous
comment or reply.

By and large, I simply try to avoid using un-paired ‘<’ and ‘>’ characters
in replies, but I just ran into the following issue in a canned response:

The following text in the canned response editor:

“<<biblio.title>>” by <<biblio.author>>, <<issues.date_due>>,
Barcode: <<items.barcode>>

Renders as

“<>” by <>, <>, Barcode: <>

When I view it in Display.

I tried using ‘<’ and ‘>’ to escape the greater than and less than
symbols; that didn’t work… using html entities did work, but … meh.

Are there any rules for escaping ‘<’ and ‘>’, and, more generally, is
there any documentation about how RT renders comments/replies and articles?

Thanks,

–Barton

In a further twist, html entities display correctly on the “Article
Display” page, but when the canned response is actually used, I see
html entities in the reply editor… but if I include text like ,
‘foo’ is removed in the reply editor… I have no way of including
something that looks like an xml tag in a canned response.

Any further thoughts on this? I’m trying to create canned responses that
involve changes to XML configuration files, and all of the tags end up
empty.

Any further thoughts on this? I’m trying to create canned responses that
involve changes to XML configuration files, and all of the tags end up
empty.

What version are you on?

I just pasted some xml in to the ticket content field, created the
ticket, and hit reply on that transaction and it seems to be working as
expected:

This is on 4.4-trunk

Regards,

Todd,

Sorry to wake the dead thread on this; the forum reminded me that it’s still out there, and it’s a problem that I still encounter.

I re-created the issue in RT-4.4.1. The issue only occurs with canned responses. I filed ticket #32374: XML tags removed in canned responses..