Double line spacing in ticket display

I noticed what seems to be an ugly interaction between the WYSIWYG
(FCKeditor) editor and the new $PlainTextMono config/preference setting
that uses CSS to make the text formatted nicely with a mono-spaced font
and line wrapping to avoid horizontal scroll bars. Ticket message
transactions added with the WYSIWYG editor contain hard
tags at the
end of newlines manually inserted in the message and included replies
which turn into double spaced lines when displayed with the new
$PlainTextMono display option.

If replies are made with the normal non-WYSIWYG editor, they do not
contain the hard line breaks (
) because they are ‘text/plain’
messages and are therefore not double spaced.

If I disable the $PlainTextMono option or use the other $PlainTextPre
option instead, then there are no double spaced newlines.

I think I traced this to: Ticket/Elements/ShowTransactionAttachments

which adds ‘plain-text-white-space’ to the

tags when displaying
messagebody class ticket correspondences. This style contains the:

white-space: pre-wrap

definition which is how this new $PlainTextMono option works, but when
combined with the way WYSIWYG created ‘text/html’ messages are
displayed, it produces double spaced lines since they contain both

tags and real newlines in the html source.

I think the way to fix this is to remove either the newlines or

tags in the $render_attachment sub, when displaying messages with the
$PlainTextMono option enabled. Does this sound reasonable?

~Jason

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

smime.p7s (3.81 KB)

Jason,

Can you tell me what version of RT you’re working with? This sounds
a lot like an issue I patched last week. My latest fixes will be in
3.8.8, (Though there are other related issues I’ve patched over the
past couple weeks that should end up in 3.8.7.)

9af5e79efcad3e8bffc9c2fe97d3fabc53f42cac and
6241b7df1b3d755c097b497b696134b8d4c2b6e3 are the two git commits it’d be
great to have you try out. Do thsoe fix your issue?On Wed, Dec 09, 2009 at 11:42:39AM -0500, Jason A. Smith wrote:

I noticed what seems to be an ugly interaction between the WYSIWYG
(FCKeditor) editor and the new $PlainTextMono config/preference setting
that uses CSS to make the text formatted nicely with a mono-spaced font
and line wrapping to avoid horizontal scroll bars. Ticket message
transactions added with the WYSIWYG editor contain hard
tags at the
end of newlines manually inserted in the message and included replies
which turn into double spaced lines when displayed with the new
$PlainTextMono display option.

If replies are made with the normal non-WYSIWYG editor, they do not
contain the hard line breaks (
) because they are ‘text/plain’
messages and are therefore not double spaced.

If I disable the $PlainTextMono option or use the other $PlainTextPre
option instead, then there are no double spaced newlines.

I think I traced this to: Ticket/Elements/ShowTransactionAttachments

which adds ‘plain-text-white-space’ to the

tags when displaying
messagebody class ticket correspondences. This style contains the:

white-space: pre-wrap

definition which is how this new $PlainTextMono option works, but when
combined with the way WYSIWYG created ‘text/html’ messages are
displayed, it produces double spaced lines since they contain both

tags and real newlines in the html source.

I think the way to fix this is to remove either the newlines or

tags in the $render_attachment sub, when displaying messages with the
$PlainTextMono option enabled. Does this sound reasonable?

~Jason


/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/


List info: The rt-devel Archives

Jason,

Can you tell me what version of RT you’re working with? This sounds
a lot like an issue I patched last week. My latest fixes will be in
3.8.8, (Though there are other related issues I’ve patched over the
past couple weeks that should end up in 3.8.7.)

Hi Jesse,

Sorry, I forgot to include our version of RT, we were using 3.8.6 and
last night I tried 3.8.7rc1 with the same results.

9af5e79efcad3e8bffc9c2fe97d3fabc53f42cac and
6241b7df1b3d755c097b497b696134b8d4c2b6e3 are the two git commits it’d be
great to have you try out. Do thsoe fix your issue?

Thanks for the quick reply and the patches, I will retrieve them from
git, test them out later today and get back to you with my results.

~Jason

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

smime.p7s (3.81 KB)

Jason,

Can you tell me what version of RT you’re working with? This sounds
a lot like an issue I patched last week. My latest fixes will be in
3.8.8, (Though there are other related issues I’ve patched over the
past couple weeks that should end up in 3.8.7.)

Hi Jesse,

Sorry, I forgot to include our version of RT, we were using 3.8.6 and
last night I tried 3.8.7rc1 with the same results.

9af5e79efcad3e8bffc9c2fe97d3fabc53f42cac and
6241b7df1b3d755c097b497b696134b8d4c2b6e3 are the two git commits it’d be
great to have you try out. Do thsoe fix your issue?

Thanks for the quick reply and the patches, I will retrieve them from
git, test them out later today and get back to you with my results.

Hi Jesse,

I applied those two patches to our RT server, which is currently running
3.8.7rc1, and it worked perfectly, with all variations of plain & html
text attachments and config/preference settings I could think of to
test! Great timing :slight_smile:

Thanks,
~Jason

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

smime.p7s (3.81 KB)