Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 50720 invoked from network); 15 Jun 2006 22:09:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jun 2006 22:09:38 -0000 Received: (qmail 50487 invoked by uid 500); 15 Jun 2006 22:08:26 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 48381 invoked by uid 500); 15 Jun 2006 22:08:16 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 44001 invoked by uid 99); 15 Jun 2006 22:07:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2006 15:07:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2006 14:39:45 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2B07E410006 for ; Thu, 15 Jun 2006 21:38:30 +0000 (GMT) Message-ID: <31276902.1150407510157.JavaMail.jira@brutus> Date: Thu, 15 Jun 2006 21:38:30 +0000 (GMT+00:00) From: "Daniel Naber (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-259) HTML Parser doesn't decode character references in attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-259?page=all ] Daniel Naber updated LUCENE-259: -------------------------------- Bugzilla Id: (was: 30621) Assign To: (was: Lucene Developers) Priority: Minor (was: Major) Decrease priority because this affects the demo only. > HTML Parser doesn't decode character references in attributes > ------------------------------------------------------------- > > Key: LUCENE-259 > URL: http://issues.apache.org/jira/browse/LUCENE-259 > Project: Lucene - Java > Type: Bug > Components: Examples > Versions: 1.4 > Environment: Operating System: All > Platform: All > Reporter: Dave Sparks > Priority: Minor > > The HTML Parser includes the values of certain attributes in the summary, the > metaTags and the output stream. Character references in the attribute values > are not decoded. Specifically: > 1. The value of the alt= attribute of an tag is included in the > summary and the output stream. This value is case-significant, and may include > character references. The character references are not decoded. > 2. The value of the content= attribute of a tag is included in the > metaTags if the tag also has a name= or http-equiv= attribute. This value is > case-significant, and may include character references. The character > references are not decoded, and the value is downcased (since the fix to bug > #27423). > I've patched our version of the parser to decode the character references, by > adding a decodeAll method to Entities to parse a String for character references > and return a String where the references have been replaced by the corresponding > characters (or the original String, if no change is needed). This method is > called to decode alt= attributes and content= attributes. I've removed the > .toLowerCase() on the content= value. I'm not really happy with this fix, as it > seems to me to be wrong to parse a value which was previously parsed as a single > token; there ought to be a way to get it right the first time. > I've left the name= and http-equiv= values alone. It's not entirely clear (to > me) whether character references are allowed, and it would be perverse to use > them here. I also appreciate the convenience of having a single combined > namespace, with downcased names, even though this is technically wrong. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org