[rt-devel] RT breaks *very* long URL's.
Frank Reppin
shauwn at relay.boerde.de
Thu Feb 14 13:35:02 EST 2002
On Thu, 14 Feb 2002, Jesse Vincent wrote:
> Interesting. Text::Wrapper isn't supposed to break words that don't
> fit on one line. The best place to play around with this is
> WebRT/html/Ticket/Elements/ShowTransaction. you might want to try
> switching the order of the URL escaping and the text wrapping.
> If that works, I'll happily make the switch in my sources.
>
> -j
>
Hi,
another - maybe much more useful point to change this behaviour
seems to be in (leaving /rt2/WebRT/html/Ticket/Elements/ShowTransaction
untouched)
/rt2/WebRT/html/Elements/MessageBox
i made a simple change there ...
cruncher# diff MessageBox MessageBox.ORIGINAL
1c1
< <TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=SOFT NAME="<%$Name%>"><% $Default
%><%$message%><%$signature%></TEXTAREA>
---
> <TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=HARD NAME="<%$Name%>"><% $Default
%><%$message%><%$signature%></TEXTAREA>
But I am still testing how it will behave :)
RESULTS SO FAR:
If I now enter a very long URL via the the MessageBox (... creating a
ticket manually) it does what I expect. The URL is fully usable and don't
gets wrapped by Text::Wrapper (you'll get a horizontal scrollbar in your
browser then) the rest of the message body looks nice too (as formatted by
staff-members) and is unchanged.
Same result if RT receives the mail via the mailgateway.
While doing some furthers test now .... i would like to add, that there
must be sth wrong with Text::Wrapper at all ?
TestScenario:
-------------
Building tickets via mailgateway without formatting the text...
Result:
----------
Well - looks OK. My Mailer (PINE in this example) wrapped words to
the next line by itself ..... and so it is displayed in the ticket too.
Very long lines are unchanged by PINE (thought they must be processed by
Text::Wrapper ?) and these long lines are displayed in the same way I
entered 'em via PINE. (might result in a scrollbar in your browser to
view the whole content of such a long line)
Overall behaviour seems to be OK.
Test Scenario:
---------------
Building such tickets manually with the WebRT-Userinterface
Result:
Looks nice too... the text gets wrapped as defined in MessageBox after
72 charracters ($Width => 72) and I can also format it by myself with
hitting ENTER at the appropriate places....
Overall behaviour seems to be OK.
Final Result:
==============
Imho will changing the code in 'MessageBox':
cruncher# diff MessageBox MessageBox.ORIGINAL
1c1
< <TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=SOFT NAME="<%$Name%>"><% $Default
%><%$message%><%$signature%></TEXTAREA>
---
> <TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=HARD NAME="<%$Name%>"><% $Default
%><%$message%><%$signature%></TEXTAREA>
bring best results and break nothing.
I would like to ask you and other subscribers at devel to test this
too in a safe environment (so that nothing important would be broken if
i am wrong with my solution for this)... for me it works fine now and
i have no trouble with unusable long URL's now.
Thanks for your time looking into this.
Friendly regards,
Frank Reppin
--
Heidestr. 15
39112 Magdeburg
More information about the Rt-devel
mailing list