def CreateSafeUserEmailForTaskName(user_email):
  """Tasks have naming rules that exclude '@' and '.'.

  Task names must match: ^[a-zA-Z0-9_-]{1,500}$

  Args:
    user_email: String user email of the task owner.

  Returns:
    String with unacceptable chars swapped.
  """
  return user_email.replace('@', '-AT-').replace('.', '-DOT-')