crm-12976-fix : using 'strstr' while placeholder replacement mechanism

CRM-12976 : after the discussion on issue 'strstr' and also a test case that denotes where the 'strstr' could fail.