On Friday 07 November 2008 15:59, j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2008-11-07 15:59:09 +0000 (Fri, 07 Nov 2008)
> New Revision: 23377
> 
> Modified:
>    trunk/plugins/SNMP/snmplib/SNMPPortNumberCallback.java
>    trunk/plugins/UPnP/org/cybergarage/xml/Node.java
> Log:
> Boolean.equal(), not ==
> 
...
> Modified: trunk/plugins/UPnP/org/cybergarage/xml/Node.java
> ===================================================================
> --- trunk/plugins/UPnP/org/cybergarage/xml/Node.java  2008-11-07 15:58:24 UTC 
(rev 23376)
> +++ trunk/plugins/UPnP/org/cybergarage/xml/Node.java  2008-11-07 15:59:09 UTC 
(rev 23377)
> @@ -385,13 +386,13 @@
>       public String toXMLString(boolean hasChildNode)
>       {
>               String xmlStr = toString();
> -             xmlStr = xmlStr.replaceAll("<", "&lt;");        
> -             xmlStr = xmlStr.replaceAll(">", "&gt;");        
> +             xmlStr = xmlStr.replaceAll("<", "&lt;");
> +             xmlStr = xmlStr.replaceAll(">", "&gt;");
>               // Thanks for Theo Beisch (11/09/04)
> -             xmlStr = xmlStr.replaceAll("&", "&amp;");       
> -             xmlStr = xmlStr.replaceAll("\"", "&quot;");     
> +             xmlStr = xmlStr.replaceAll("&", "&amp;");

I know this is in a library ... but isn't the & -> &amp; substitution here 
going to cause problems by making < into &amp;lt; ?? Could this explain some 
of the problems we've had with UPnP even? Is there any corresponding code 
that assumes that there are &amp;lt;'s??

> +             xmlStr = xmlStr.replaceAll("\"", "&quot;");
>               // Thanks for Brian Owens (12/02/04)
> -             xmlStr = xmlStr.replaceAll("'", "&apos;");      
> +             xmlStr = xmlStr.replaceAll("'", "&apos;");
>               return xmlStr;
>       }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081108/19341bd9/attachment.pgp>

Reply via email to