Help Desk Software & Beyond
May 17, 2012, 04:53:18 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Double quotes in the Ticket subject  (Read 734 times)
lazna
Newbie
*

Karma: 0
Posts: 6


View Profile
« on: December 30, 2010, 08:06:08 AM »

New ticket with subject: Optika "Na jezerce 7-1"

In the list of ticket, the subject is diplayed in this form: Optika "Na jezerce 7-1&qu...

When I click to Subject, the subject is diplayed correctly in the Ticket editor

L.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: December 30, 2010, 09:41:32 AM »

Special characters are stored as HTML code so quotes are converted to "

When the Ticket Subject is displayed in a browser, the HTML code " is automatically displayed as a quotation mark, ".  This is a function of the browser.

TTX also clips off any Subject line that exceeds 25 characters.

In your example, the 25th & 26th characters just happen to be in the middle of the HTML code for the quotation mark.  Since &qu is not valid HTML code for anything, the browser no longer knows it's a quotation mark and just displays &qu.

In the Ticket itself, the Subject is not cropped so everything displays just fine.

Everything is working normally.

To guarantee this would never happen would require a modification that prevents the cropping of any Subject Lines.  The problem with this is that longer Subject Lines would make the Ticket List table look sloppy.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Alex
Administrator
Hero Member
*****

Karma: 22
Posts: 605



View Profile WWW
« Reply #2 on: December 30, 2010, 11:46:45 AM »

This bug (escaping prior to truncating) was fixed long ago. Here is the fragment from current TTXDesk.pm


Code:
        } elsif ($col eq 'subject') {
          $align = 'left';
          my $dots = '...';
          $val =~ s/\b([^\s]{15,15})([^\s])*/$1.$dots/ge;
          $val =~ /^(.{1,30})(.*)/;
          $val = $1;
          $val .= '...' if $2 ne undef;
          $val =~ s/</&lt;/g;
Logged

Follow me on: LinkedIn
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #3 on: December 30, 2010, 11:49:14 AM »

This bug (escaping prior to truncating) was fixed long ago. Here is the fragment from current TTXDesk.pm


Code:
        } elsif ($col eq 'subject') {
          $align = 'left';
          my $dots = '...';
          $val =~ s/\b([^\s]{15,15})([^\s])*/$1.$dots/ge;
          $val =~ /^(.{1,30})(.*)/;
          $val = $1;
          $val .= '...' if $2 ne undef;
          $val =~ s/</&lt;/g;

awesome!
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 19 queries.