From 8dbdad31651939f62b760243e4beb6d787840d8a Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Thu, 16 Nov 2006 20:49:02 +0000 Subject: 2006-11-16 Roman Kennke * gnu/javax/swing/text/html/parser/support/Parser.java (_handleText): Fixed condition for consuming whitespace. Removed validator check, this is superfluous now. --- gnu/javax/swing/text/html/parser/support/Parser.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gnu') diff --git a/gnu/javax/swing/text/html/parser/support/Parser.java b/gnu/javax/swing/text/html/parser/support/Parser.java index 8304c1f66..98058e503 100644 --- a/gnu/javax/swing/text/html/parser/support/Parser.java +++ b/gnu/javax/swing/text/html/parser/support/Parser.java @@ -662,19 +662,15 @@ public class Parser if (text != null && text.length > 0 // According to the specs we need to discard whitespace immediately // before a closing tag. - && (text.length > 1 || (text[0] == ' ' && ! TAG_CLOSE.matches(this)))) + && (text.length > 1 || text[0] != ' ' || ! TAG_CLOSE.matches(this))) { TagElement pcdata = new TagElement(dtd.getElement("#pcdata")); - if ((text.length > 1 && text[0] != ' ') - || validator.tagIsValidForContext(pcdata) == Boolean.TRUE) - { - attributes = htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET; - _handleEmptyTag(pcdata); + attributes = htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET; + _handleEmptyTag(pcdata); - handleText(text); - if (titleOpen) - title.append(text); - } + handleText(text); + if (titleOpen) + title.append(text); } } -- cgit v1.2.1