{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/8649","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8649/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8649/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8649/events","html_url":"https://github.com/joomla/joomla-cms/issues/8649","id":121781475,"number":8649,"title":"Searching with apostrophes doesn't return expected results","user":{"login":"liamhanks","id":1881813,"avatar_url":"https://avatars.githubusercontent.com/u/1881813?v=3","gravatar_id":"","url":"https://api.github.com/users/liamhanks","html_url":"https://github.com/liamhanks","followers_url":"https://api.github.com/users/liamhanks/followers","following_url":"https://api.github.com/users/liamhanks/following{/other_user}","gists_url":"https://api.github.com/users/liamhanks/gists{/gist_id}","starred_url":"https://api.github.com/users/liamhanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamhanks/subscriptions","organizations_url":"https://api.github.com/users/liamhanks/orgs","repos_url":"https://api.github.com/users/liamhanks/repos","events_url":"https://api.github.com/users/liamhanks/events{/privacy}","received_events_url":"https://api.github.com/users/liamhanks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-11T19:59:54Z","updated_at":"2015-12-21T16:33:51Z","closed_at":"2015-12-21T13:21:48Z","body":"#### Steps to reproduce the issue\r\nFrom a com_search search bar, search for a word with an apostrophe\r\n\r\n\r\n#### Expected result\r\nThe expected result is for the word to be found and results returned.\r\n\r\n\r\n#### Actual result\r\nJoomla removes the apostrophe creating a new word (\"don't\" becomes \"dont\"), and does not display any (or at least, correct) results.\r\n\r\n\r\n#### System information (as much as possible)\r\nThis issue can be reproduced going back to at least Joomla 2.5, but is current on 3.4.5\r\n\r\n\r\n#### Additional comments\r\nI've been able to correct this issue with the following change:\r\nin com_search/controller.php line ~47:\r\n\r\n$badchars = array('#', '>', '<', '\\\\');\r\n$searchword = trim(str_replace($badchars, '', $this->input->getString('searchword', null, 'post')));\r\n\r\nreplace it with this:\r\n\r\n$badchars = array('#', '>', '<', '\\\\', '\\'');\r\n$goodchars = array('','','','',' ');\r\n$searchword = trim(str_replace($badchars, $goodchars, $this->input->getString('searchword', null, 'post')));"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/166352391","html_url":"https://github.com/joomla/joomla-cms/issues/8649#issuecomment-166352391","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8649","id":166352391,"user":{"login":"infograf768","id":869724,"avatar_url":"https://avatars.githubusercontent.com/u/869724?v=3","gravatar_id":"","url":"https://api.github.com/users/infograf768","html_url":"https://github.com/infograf768","followers_url":"https://api.github.com/users/infograf768/followers","following_url":"https://api.github.com/users/infograf768/following{/other_user}","gists_url":"https://api.github.com/users/infograf768/gists{/gist_id}","starred_url":"https://api.github.com/users/infograf768/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infograf768/subscriptions","organizations_url":"https://api.github.com/users/infograf768/orgs","repos_url":"https://api.github.com/users/infograf768/repos","events_url":"https://api.github.com/users/infograf768/events{/privacy}","received_events_url":"https://api.github.com/users/infograf768/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T16:33:51Z","updated_at":"2015-12-21T16:33:51Z","body":"Or, search for \"acadie\"."}}