lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-429) Little improvement for SimpleHTMLEncoder
Date Thu, 22 Sep 2005 17:00:28 GMT
     [ http://issues.apache.org/jira/browse/LUCENE-429?page=all ]

Erik Hatcher updated LUCENE-429:
--------------------------------

    Bugzilla Id:   (was: 36333)
      Component: Examples
                     (was: Other)
    Description: 
The SimpleHTMLEncoder could be improved slightly: all characters with code >=
128 should be encoded as character entities. The reason is, that the encoder
does not know the encoding that is used for the response. Therefore it is safer
to encode all characters beyond ASCII as character entities.

Here is the necessary modification of SimpleHTMLEncoder:

       default:
         if (c < 128) {
           result.append(c);
         } else {
           result.append("&#").append((int)c).append(";");
         }

  was:
The SimpleHTMLEncoder could be improved slightly: all characters with code >=
128 should be encoded as character entities. The reason is, that the encoder
does not know the encoding that is used for the response. Therefore it is safer
to encode all characters beyond ASCII as character entities.

Here is the necessary modification of SimpleHTMLEncoder:

       default:
         if (c < 128) {
           result.append(c);
         } else {
           result.append("&#").append((int)c).append(";");
         }

    Environment: 
Operating System: other
Platform: Other

  was:
Operating System: other
Platform: Other

      Assign To:     (was: Lucene Developers)

> Little improvement for SimpleHTMLEncoder
> ----------------------------------------
>
>          Key: LUCENE-429
>          URL: http://issues.apache.org/jira/browse/LUCENE-429
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Examples
>     Versions: CVS Nightly - Specify date in submission
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Stefan Wachter
>     Priority: Minor

>
> The SimpleHTMLEncoder could be improved slightly: all characters with code >=
> 128 should be encoded as character entities. The reason is, that the encoder
> does not know the encoding that is used for the response. Therefore it is safer
> to encode all characters beyond ASCII as character entities.
> Here is the necessary modification of SimpleHTMLEncoder:
>        default:
>          if (c < 128) {
>            result.append(c);
>          } else {
>            result.append("&#").append((int)c).append(";");
>          }

-- 
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


Mime
View raw message