Bug 863187 - Restrict result strings to alphanumeric, "_", "-", and ".". r=bc