private static String unquote(String s) {
    while (s.startsWith("\"") || s.startsWith("'")) {
      s = s.substring(1);
    }
    while (s.endsWith("\"") || s.endsWith("'")) {
      s = s.substring(0, s.length() - 1);
    }
    return s;
  }
Fuzzy unquoting mechanism that works also with somewhat malformed
quotes.

@param s string to unquote
@return unquoted string
crawler-commons/src/main/java/achecrawler/crawler/crawlercommons/util/MediaType.java