package com.github.ghostpassword.ghostpasswordbackend;

/**
 * General utils.
 * @author udeyoje
 */
public class Utils
{
    /**
     * Calculates a key name from a file name.
     * @param friendlyName
     * @return a file system friendly name for this password key
     */
    public static String calculateKey(String friendlyName){
        friendlyName = friendlyName.trim();
        friendlyName = friendlyName.replaceAll("\\Q \\E", "-");
        friendlyName = friendlyName.replaceAll("!@#$%^&*()+\"", "_");
        return friendlyName;
    }
}

@@ -486,16 +486,17 @@
 aceAll(%22
+%5B
 !@#$%25%5E&*
@@ -500,16 +500,17 @@
 %5E&*()+%5C%22
+%5D
 %22, %22_%22);

test and fixes