[RESOLVED] Customfield dropdown adding \\\ to options?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

[RESOLVED] Customfield dropdown adding \\\ to options?

Post by Raven »

Hi, I have noticed that when adding a list of options to a customfield for a dropdown menu that if I have an option like this: Don't Know then save, then edit again it has been changed to read Don\'t Know.

No big deal as it does not show when viewingoptions on the customer side. However, if I edit again then it shows like: Don\\\'t Know... This then shows the extra \ for the customer when viewing the drop down.

Any ideas on how to prevent this from happening or at least check that any ' have an \ next to them before simply adding more and more each time?

I hope you see what I mean.
Last edited by Raven on Fri Oct 30, 2009 1:17 am, edited 1 time in total.
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You're right, it's another PHP "magic quotes" issue. I'm so glad they are disabling this feature in PHP 6.

Anyway, try adding

Code: Select all

$query = stripslashes($query);
just below

Code: Select all

$maxlen = hesk_input($_GET['m']) or $maxlen = 255;
in file admin/options.php

Then go to the settings, fix all values, save changes and it should work fine from now on.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

Nice one :) That fixed it!

Thank you for your help (again hehe) - Quick question, are all of these little bug fixes being carried over to the next version of HESK by chance?

Cheers
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

No, all the bugs are fixed of course in the next version and new bugs are added so I have more work for the future 8) :lol:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

As is always the case with any code hehe

Thanks for all your hard work 8) We all appreciate the time and effort you have put in to this and it shows.

Thank you
Post Reply