Handle double slashes in DocumentAPI