Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 6 of 6
  1. #1
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317

    Solved Channel description url decode

    So I have added automatically to new channels description a link that has a bookmark creation with the respective channels. The problem is when these channels (and parents) contain spaces.

    Example:
    Pathway "[cspacer0C]space test/test"

    Encoded (so it doesn't break BB markup) becomes: %5Bcspacer0C%5Dspace+test%2Ftest

    The encoded link by the ts3 client: ts3server://<-server address->?port=9987&channel=%5Bcspacer0C%5Dspace+test%2Fte st&addbookmark=Test

    Decoded becomes: ts3server://<-server address->?port=9987&channel=[cspacer0C]space+test/test&addbookmark=Test

    As you can see, the client is not converting the '+' back to space which causes the added bookmark to not work (enter in channel automatically).

    It is not top priority but it is kinda annoying I had to replace the + with space with preg_replace.
    Last edited by barricas; October 2nd, 2013 at 12:02 AM.

  2. #2
    Join Date
    January 2010
    Location
    El Prat de Llobregat (Barcelona, Spain)
    Posts
    2,698
    Quote Originally Posted by barricas View Post
    So I have added automatically to new channels description a link that has a bookmark creation with the respective channels. The problem is when these channels (and parents) contain spaces.

    Example:
    Pathway "[cspacer0C]space test/test"

    Encoded (so it doesn't break BB markup) becomes: %5Bcspacer0C%5Dspace+test%2Ftest

    Decoded becomes: ts3server://<-server address->?port=9987&channel=[cspacer0C]space+test/test&addbookmark=Test

    As you can see, the client is not converting the '+' back to space which causes the added bookmark to not work (enter in channel automatically).
    Have you try with %20 instead of + ?
    Something like
    %5Bcspacer0C%5Dspace%20test%2Ftest
    ?

  3. #3
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    No, I haven't tried because php's url_encode converts to +
    But yes, it actually made more sense if it converted to %20

  4. #4
    Join Date
    June 2008
    Posts
    18,513
    Where ist that + comming from? I can not reproduce this in our software.

    I don't see a problem with the client, because "%20" for a space is used in our invite urls and the client alos expects "%20" for a space on connect.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  5. #5
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Quote Originally Posted by dante696 View Post
    Where ist that + comming from? I can not reproduce this in our software.

    I don't see a problem with the client, because "%20" for a space is used in our invite urls and the client alos expects "%20" for a space on connect.
    From php's urlencode. (which I then place in channel description with ts3 php framework).

    BTW I think you can close this thread, %20 is a better way to encode spaces.

  6. #6
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    I would like to update that, due to the amazing php's logic they have a similar function that follows the RFC rules.

    And.... it is rawurlencode(). Yeah that's it. This one encodes correctly.

    So if anyone would also want to do this. use rawurlencode().

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Not possible] Decode uniqueid in exported ini file
    By PituPl in forum General Questions
    Replies: 1
    Last Post: August 23rd, 2014, 03:08 PM
  2. Decode Error
    By Arctic Tail in forum Bug Reports [EN/DE]
    Replies: 1
    Last Post: September 28th, 2012, 06:34 PM
  3. [Resolved] channel description editor change wrong channel
    By Enceladus in forum Bug Reports [EN/DE]
    Replies: 2
    Last Post: June 13th, 2012, 10:14 AM
  4. Channel Admins are unable to change Channel Description
    By sinister_evil in forum Permission System
    Replies: 4
    Last Post: January 17th, 2012, 03:13 PM
  5. channel description with uploaded channel images
    By Fundaris in forum General Questions
    Replies: 1
    Last Post: September 15th, 2010, 04:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •