Improved tolerance for quote parsing