diff options
Diffstat (limited to 'src/de/podfetcher/syndication/namespace/content/NSContent.java')
-rw-r--r-- | src/de/podfetcher/syndication/namespace/content/NSContent.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/de/podfetcher/syndication/namespace/content/NSContent.java b/src/de/podfetcher/syndication/namespace/content/NSContent.java index d9f3501c9..d5dba9101 100644 --- a/src/de/podfetcher/syndication/namespace/content/NSContent.java +++ b/src/de/podfetcher/syndication/namespace/content/NSContent.java @@ -14,38 +14,22 @@ public class NSContent extends Namespace { private static final String ENCODED = "encoded"; - private StringBuffer encoded; - @Override public SyndElement handleElementStart(String localName, HandlerState state, Attributes attributes) { - if (localName.equals(ENCODED)) { - encoded = new StringBuffer(); - } return new SyndElement(localName, this); } @Override public void handleCharacters(HandlerState state, char[] ch, int start, int length) { - if (state.getTagstack().size() >= 2) { - String content = new String(ch, start, length); - SyndElement topElement = state.getTagstack().peek(); - String top = topElement.getName(); - SyndElement secondElement = state.getSecondTag(); - String second = secondElement.getName(); - if (top.equals(ENCODED) && second.equals(NSRSS20.ITEM)) { - encoded.append(content); - } - } } @Override public void handleElementEnd(String localName, HandlerState state) { if (localName.equals(ENCODED)) { - state.getCurrentItem().setContentEncoded(StringEscapeUtils.unescapeHtml4(encoded.toString())); - encoded = null; + state.getCurrentItem().setContentEncoded(StringEscapeUtils.unescapeHtml4(state.getContentBuf().toString())); } } |