CRM-13745 - fix mysql exception

----------------------------------------
* CRM-13745: CRM_Contact_Form_Search_Custom_FullText: broken links from search results
  http://issues.civicrm.org/jira/browse/CRM-13745