Forum Discussion

Gursimrat's avatar
Gursimrat
Leader
11 years ago

"Subscribe Labels" issue for "&&"

We are creating a labels feature for predefined labels. We have a set of 5 labels out of which 4 are having "&" in them. They are as below

 

1.) lorem & ipsum

2.) lorem1 the ipsum

3.) ipsum & lorem

4.) ipsumtwo & lorem

5.) ipsum & ipsum

 

The issue comes on the filteredbylabelpage page, when we click on subscribe link for the labels which have "&", they take us to Item Not Found page but works fin for the label 2 in the above list. After debugging, we found that lithium does not convert the "&" in the URL to its ASCII value in the URL and keeps it as "&"

 

below are the URLs

 

http://community-url/t5/forums/filteredbylabelpage.filteredbylabelname.subscribetolabelname.link:subscribeaction/label-name/lorem%20&%20ipsum/board-id/10031/subscribed/false?t:ac=board-id/10031/label-name/lorem%20&%20ipsum&ticket=v9x1zpoqdDAL_149

 

it didn't change it to ascii, hence all the text after that is now working as a parameter.

 

http://community-url/t5/forums/filteredbylabelpage.filteredbylabelname.subscribetolabelname.link:subscribeaction/label-name/lorem1%20the%20ipsum/board-id/10031/subscribed/false?t:ac=board-id/10031/label-name/lorem1%20the%20ipsum&ticket=v9x1zpoqdDAL_149

 

 

Is there any fix for this or do we have to replace "&" with and. Also, can this issue occur with any other character, such as a "/" or "-" etc. we haven't tested these.

  • Hey Gursimrat,

     

    Looks like you found a bug. A bug has been filed in the system regarding this.

     

    For now I would suggest "and" instead of "&" as you suggested. As for the other characters, labels cannot contain the characters '/', '\', '#', '?', or ';' and the system will not allow you to create labels with those characters. "-" looks to be fine to use.

     

    Thank you for letting us know about this,

     

    Yuri

     

     

2 Replies

  • YuriK's avatar
    YuriK
    Khoros Expert
    11 years ago

    Hey Gursimrat,

     

    Looks like you found a bug. A bug has been filed in the system regarding this.

     

    For now I would suggest "and" instead of "&" as you suggested. As for the other characters, labels cannot contain the characters '/', '\', '#', '?', or ';' and the system will not allow you to create labels with those characters. "-" looks to be fine to use.

     

    Thank you for letting us know about this,

     

    Yuri