Fix tag failure from messages containing spaces and/or single quotes