[rt-devel] RT breaks *very* long URL's.

Feargal Reilly feargal at thecia.ie
Fri Feb 15 08:05:24 EST 2002


I'd say do the wrapping in ShowTransaction.
The 'wrap' attribute isn't part of the HTML specs, so you can't guarantee 
it'll perform correctly.
-Feargal.

At 19:29 14/02/02, Jesse Vincent wrote:
>Thanks for the sleuthing.
>
>         This does leave us with the question about whether soft or hard
>wrapping is "the right thing" there, since email messages aren't automatically
>wrapped on generation.  ISTR that I used to have soft wrapping the default
>and people complained because users were getting run-on emails :/
>Anyone got a brilliant idea?
>
>         J
>
>
>On Thu, Feb 14, 2002 at 07:35:02PM +0100, Frank Reppin wrote:
> > 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
> >
> >
> >
>
>--
>http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.
>
>_______________________________________________
>rt-devel mailing list
>rt-devel at lists.fsck.com
>http://lists.fsck.com/mailman/listinfo/rt-devel

Feargal Reilly,
Systems Administrator,
The CIA.





More information about the Rt-devel mailing list