protected String removeSpacesInsideTags(String html) {
		//remove spaces around equals sign inside tags
		html = tagPropertyPattern.matcher(html).replaceAll("$1=");
		
		//remove ending spaces inside tags
		//html = tagEndSpacePattern.matcher(html).replaceAll("$1$2");
		Matcher matcher = tagEndSpacePattern.matcher(html);
		StringBuffer sb = new StringBuffer();
		while(matcher.find()) {
			//keep space if attribute value is unquoted before trailing slash
			if(matcher.group(2).startsWith("/") && tagLastUnquotedValuePattern.matcher(matcher.group(1)).find()) {
				matcher.appendReplacement(sb, "$1 $2");
			} else {
				matcher.appendReplacement(sb, "$1$2");
			}
		}
		matcher.appendTail(sb);
		html = sb.toString();
		
		return html;
	}