[icedtea-web] RFE: Patch to fix character escape handling for the plugin

Andrew Su asu at redhat.com
Wed Dec 8 12:49:29 PST 2010


Hello,

----- "Deepak Bhole" <dbhole at redhat.com> wrote:

> From: "Deepak Bhole" <dbhole at redhat.com>
> To: "IcedTea Distro List" <distro-pkg-dev at openjdk.java.net>
> Sent: Wednesday, December 8, 2010 3:27:58 PM GMT -05:00 US/Canada Eastern
> Subject: [icedtea-web] RFE: Patch to fix character escape handling for the plugin
>
> This patch fixes bug# 597:
> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=597
> 
> The issue is that the parser cannot handle a quote in a param value as
> it uses
> quotes for delimiters. The solution is to encode the quote, and decode
> it after
> the parser has distinguished the identifiers (currently decoding is
> done before
> parsing since the original intent to encode was to just pass data over
> the FIFO
> pipe).
> 
> ChangeLog:
> 2010-12-08  Deepak Bhole <dbhole at redhat.com>
> 
>     * plugin/icedteanp/IcedTeaNPPlugin.cc
>     (encode_string): New function. Takes a string and replaces certain
> special
>     characters with html escapes.
>     (plugin_create_applet_tag): Use the new encode_string function to
> encode
>     argn and argv right away, rather than encoding the whole tag.
>     * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
>     (handleMessage): Move decoding out so that it is done after
> parsing.
>     (decodeString): New function. Decodes the given string such that
> html
>     escapes are replaced by the original special characters.
>     (scanTag): Decode parameter name and value before adding it to
> attribute
>     array.
> 
> Comments?

The changes look good to me, okay for HEAD and 1.0.

Cheers,
  Andrew

> 
> Cheers,
> Deepak



More information about the distro-pkg-dev mailing list