[ 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to