Syntax error (unrecognized expression) in jquery.min.js when changing the patient of an appointment

Situation
Syntax error (unrecognized expression) in jquery.min.js when changing the patient of an appointment when Logging (for debugging) is turned on.

Here is the actual error:

OpenEMR Version
I’m using OpenEMR version 5.0.2

Browser:
I’m using: Safari latest version (Version 12.1.2 (14607.3.9))

Operating System
I’m using:
Client: macOS Mojave
Server: AWS Ubuntu Instance (Standard)

Logs
There is nothing pertinent in the logs.