move quote check for lib.php to settings.php