$_GET['type'] returns truncated folder name due to ampersand
Posted: Wed Feb 11, 2015 4:20 pm
This is my first post. I am basically a PHP novice, and I'm using some code mostly developed by someone else. The general purpose of the code is to generate links dynamically to folders and subfolders and files. It works great except for folders with an ampersand (&) in the name, which is causing $_GET['type'] to truncate the name at the ampersand's location.
I realize, now, that just because Microsoft will let you name folders with various characters doesn't mean that you should. I would just rename the folder, but our users have access to various folders in which they can create, rename, and delete folders and subfolders as they wish. So, I have to have a solution that allows for that.
This statement:
$CurrentFolderName = $_GET['type'];
Sets $CurrentFolderName to this:
http://OurServerName/CS/Planning
It should be this:
http://OurServerName/CS/Planning & Program Development
How do I get it to show the full folder name? I have searched Google and forums and haven't found the answer.
Thank you for the assistance. I will be checking for answers in the morning.
I realize, now, that just because Microsoft will let you name folders with various characters doesn't mean that you should. I would just rename the folder, but our users have access to various folders in which they can create, rename, and delete folders and subfolders as they wish. So, I have to have a solution that allows for that.
This statement:
$CurrentFolderName = $_GET['type'];
Sets $CurrentFolderName to this:
http://OurServerName/CS/Planning
It should be this:
http://OurServerName/CS/Planning & Program Development
How do I get it to show the full folder name? I have searched Google and forums and haven't found the answer.
Thank you for the assistance. I will be checking for answers in the morning.