public static String fixAbsoluteLink(String path, String hostAndPath, String protocol) {
		path = path.replace("../", "");
		path = path.replace("./", "");
		if (!path.startsWith(protocol)) {
			if ((hostAndPath.endsWith(URL_PREFIX) && !path.startsWith(URL_PREFIX))
					|| (!hostAndPath.endsWith(URL_PREFIX) && path.startsWith(URL_PREFIX))) {
				path = hostAndPath + path;
			} else if (!hostAndPath.endsWith(URL_PREFIX) && !path.startsWith(URL_PREFIX)) {
				path = hostAndPath + URL_PREFIX + path;
			} else if (hostAndPath.endsWith(URL_PREFIX) && path.startsWith(URL_PREFIX)) {
				path = hostAndPath + path.substring(1, path.length());
			}
			path = protocol + "://" + path;
			return path;
		}
		return path;
	}