Page 1 of 1

issue: parsing url in admin ticket

Posted: Tue Aug 14, 2012 5:15 am
by sean
Script URL: https://top-choice.com.au/helpdesk/
Version of script: 2.4
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: link, url, parse, admin, ticket

Write your message below:
hi, not the end of the world, just small issue

when I (admin) reply a ticket at the admin, occasionally I need to give url to customer. the url I entered is something like this:
"http://top-choice.com.au/store/index.ph ... cts_id=217"

however, the text of clickable link turned out to be only "top-choice.com.au/store/index.php" everything behind the "?" seems to be ignored. Although the clickable link is still linking to correct url "http://top-choice.com.au/store/index.ph ... cts_id=217"

Please kindly look at below image and you will know what I mean:
Image

Any idea how to fix it?

btw, this software is awesome!

Re: issue: parsing url in admin ticket

Posted: Tue Aug 14, 2012 1:16 pm
by Klemen
That's actually on purpose. If you wish to display the full URL instead try this:

1. open "inc/common.inc.php" in Notepad
2. change

Code: Select all

htmlspecialchars($linkText)
to

Code: Select all

$completeUrl
3. save, upload and test on a new ticket.

Re: issue: parsing url in admin ticket

Posted: Tue Aug 14, 2012 2:01 pm
by sean
Thank you!! That helped.

htmlspecialchars($completeUrl) will turn & into & (if URL contains "&" )
I tried putting just "$completeUrl" and it still worked. Would without the htmlspecialchars() do any harm?

Thanks.

Re: issue: parsing url in admin ticket

Posted: Tue Aug 14, 2012 2:13 pm
by Klemen
You're right, it's not needed here because the message already passes htmlspecialchars before being passed to this function.

I've modified the above code so anyone else trying this doesn't add it.