sanitize gID

as discussed here https://github.com/concrete5/concrete5/pull/1772