On my url link if the user click on a like some times the person who post question may use apostrophe
And answer link
I have tried using urlencode()
But now the url outputs
How can I still make sure when user has apostrophe, question marks in link title that the url will still work and not throw The URI you submitted has disallowed characters.
User.php (Size: 2.71 KB / Downloads: 3)
Code:
http://project.com/questions/2/What's-you-all-on-the-forum-doing?And answer link
Code:
http://project.com/questions/2/What's-you-all-on-the-forum-doing?/42/#42I have tried using urlencode()
PHP Code:
anchor('questions/' . $question['question_id'] .'/'. str_replace(' ', '-', $question['title']), character_limiter($question['title'], 15), array('target' => '_blank'))
But now the url outputs
PHP Code:
http://project.com/questions/2/What%27s+you+all+on+the+forum+doing%3F
How can I still make sure when user has apostrophe, question marks in link title that the url will still work and not throw The URI you submitted has disallowed characters.
User.php (Size: 2.71 KB / Downloads: 3)