O
omicron

  • Jan 13, 2015
  • Joined Jan 8, 2015
  • 0 best answers
  • That setting wasn't defined in the config but setting it did nothing as I suspected; I spent the last hour or so actually debugging the osTicket script to find out exactly where the problem is in the script and for me I tracked it down to the include/htmLawed.php file and the hl_tidy function around line 644.Looking at the function right away it coverts your body's message characters "<", ">", "\n", "\r", "\t", " " into "\x01", "\x02", "\x03", "\x04", "\x05", "\x07" then before it returns the message it looks like it converts the \x## back to there proper characters/returns after its done processing the message but somewhere along the process the converting back and forth is lost and the line breaks are removed.My simple fix for the problem is at the top of the function calling $t = nl2br($t); and now my line breaks work and the function/script should still work fine (so far) for me at least.

  • I'll take a look at the setting and see but it sounds like that's release specifically to tickets created via email, which doing a search for line breaks problems in this forum I was able to find plenty of people having problems with tickets created from emails not having line breaks when logged in the system but this from tickets created directly from osticket script via the web.

  • Unfortunately no, all of our servers are running nginx.  We didn't have problems with 1.6 on our nginx server and I doubt others who are running on nginx are having the issue too, its weird...  I can't even think of any nginx/php setting that would even cause such behavior but that's what I'm going to Google around now for and see if I can't find anything.

  • So we were running a real old version like 1.6.X and I managed to get us upgraded to v1.9.4 and everything is fine except one problem which is a annoying problem for us as things would be easier if line breaks were correctly saved when a new ticket is made.I can't find any settings nor find anything in the forums about anyone else having this problem which makes me suspect its just me cause there's no way others are dealing with this or that the script naturally functions this way.Some details that might help, script is 1.9.4 running on a nginx server with php-fpm. I did look at the database and find the table that stores the ticket body to see if the data is being logged with no line breaks and formatting or if it is and the backend just isn't displaying it, and I can say that it is inserting the data with no line breaks when the ticket is made as older ticket before the upgrade that do have line breaks show up fine on the backend when you go to view them.Thanks