support for single quotes (#681)

This commit is contained in:
Athou
2014-11-26 14:19:08 +01:00
parent ed81fc576a
commit 77c3ec0bbe
2 changed files with 11 additions and 4 deletions

View File

@@ -185,12 +185,12 @@ public class FeedUtils {
}
String pi = new String(ArrayUtils.subarray(bytes, 0, index + 1));
index = StringUtils.indexOf(pi, "encoding=\"");
index = StringUtils.indexOf(pi, "encoding=");
if (index == -1) {
return null;
}
String encoding = pi.substring(index + 10, pi.length());
encoding = encoding.substring(0, encoding.indexOf('"'));
encoding = encoding.substring(0, Math.max(encoding.indexOf(' ') - 1, 0));
return encoding;
}