Re: [rt-users] Search format changed after upgrade

2012-11-14 Thread Leo Gorauskas
Thomas, that worked. Thanks.


On Tue, Nov 13, 2012 at 10:10 AM, Thomas Sibley t...@bestpractical.comwrote:

 On 11/12/2012 03:26 PM, Leo Gorauskas wrote:
  How can I add a class or ID to an element within a search format?

 You'll need to adjust the allowed HTML attributes, but be aware of the
 potential security concerns (faking up transactions and other parts of
 the UI in arbitrary messages).  Put the following in
 local/lib/RT/Interface/Web_Local.pm:

 package HTML::Mason::Commands;
 our %SCRUBBER_ALLOWED_ATTRIBUTES;
 $SCRUBBER_ALLOWED_ATTRIBUTES{'id'}= 1;
 $SCRUBBER_ALLOWED_ATTRIBUTES{'class'} = 1;
 1;

 Then clear the mason cache and restart RT.
 
 We're hiring! http://bestpractical.com/jobs


We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Search format changed after upgrade

2012-11-13 Thread Ruslan Zakirov
Hi,

As formats are user enterable and can be passed via arguments, they
are scrubbed. Search for scrubber in lib/RT/Interface/Web.pm .

On Tue, Nov 13, 2012 at 3:26 AM, Leo Gorauskas goraus...@gmail.com wrote:
 I had a custom search format that added a class to the Priority display so I
 can highlight it according to the priority number. After upgrading from
 4.0.1 to 4.0.8, I can no longer add classes or ids to any of the format
 elements.

 Here is the original format entry that got changed:

 '   ba href=/Ticket/Display.html?id=__idid__/a/b/TITLE:#',
 'div style=text-align: center;
 class=pri-__PriorityPriority__/div',
 '__Created__',
 'ba
 href=/Ticket/Display.html?id=__idSubject__/a/b/TITLE:Subject',
 'a
 href=/Ticket/Display.html?Action=Takeamp;id=__id__Take/a/TITLE:nbsp;
 '

 If I try and change it back, the class definition disappears when i click
 apply.


 How can I add a class or ID to an element within a search format?

 Thanks.


 Leo.
 
 We're hiring! http://bestpractical.com/jobs




-- 
Best regards, Ruslan.

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Search format changed after upgrade

2012-11-13 Thread Thomas Sibley
On 11/12/2012 03:26 PM, Leo Gorauskas wrote:
 How can I add a class or ID to an element within a search format?

You'll need to adjust the allowed HTML attributes, but be aware of the
potential security concerns (faking up transactions and other parts of
the UI in arbitrary messages).  Put the following in
local/lib/RT/Interface/Web_Local.pm:

package HTML::Mason::Commands;
our %SCRUBBER_ALLOWED_ATTRIBUTES;
$SCRUBBER_ALLOWED_ATTRIBUTES{'id'}= 1;
$SCRUBBER_ALLOWED_ATTRIBUTES{'class'} = 1;
1;

Then clear the mason cache and restart RT.

We're hiring! http://bestpractical.com/jobs


[rt-users] Search format changed after upgrade

2012-11-12 Thread Leo Gorauskas
I had a custom search format that added a class to the Priority display so
I can highlight it according to the priority number. After upgrading from
4.0.1 to 4.0.8, I can no longer add classes or ids to any of the format
elements.

Here is the original format entry that got changed:

'   ba href=/Ticket/Display.html?id=__idid__/a/b/TITLE:#',
'div style=text-align: center; class=pri-__Priority__
__Priority__/div',
'__Created__',
'ba
href=/Ticket/Display.html?id=__idSubject__/a/b/TITLE:Subject',
'a
href=/Ticket/Display.html?Action=Takeamp;id=__id__Take/a/TITLE:nbsp;
'

If I try and change it back, the class definition disappears when i click
apply.


How can I add a class or ID to an element within a search format?

Thanks.


Leo.

We're hiring! http://bestpractical.com/jobs