// Until early 0.8 beta3 nightly builds, credentials were stored directly in the bookmark's url.
// Now bookmark locations are free of credentials, these are stored in a dedicated credentials file where
// the password is encrypted.
try {
FileURL url = FileURL.getFileURL(characters.toString().trim());
Credentials credentials = url.getCredentials();
// If the URL contains credentials, import them into CredentialsManager and remove credentials
// from the bookmark's location
if(credentials!=null) {
CredentialsManager.addCredentials(new CredentialsMapping(credentials, url, true));