Quick Fix on the xloadtree code about bad html specialchars escaping and xml encoding
authorJehan-Guillaume (ioguix) de Rorthais <jgdr@dalibo.com>
Wed, 29 Sep 2010 15:52:09 +0000 (17:52 +0200)
committerGuillaume (ioguix) de Rorthais <ioguix@free.fr>
Wed, 29 Sep 2010 15:52:09 +0000 (17:52 +0200)
classes/Misc.php
xloadtree/xtree2.js

index 77e4ca1abe67cdc867f4b90f42a935133ed3d7c8..4afcc06eeadffd33c6f266ea059f635123e57d92 100644 (file)
                                header("Content-Type: text/xml");
                                header("Cache-Control: no-cache");
 
-                               echo "<?xml version=\"1.0\"?>\n";
+                               echo "<?xml version=\"1.0\" encoding=\"", htmlspecialchars($lang['appcharset']), "\"?>\n";
 
                                echo "<tree>\n";
                        }
index 6218d78556f45672e8baa39a26a69ac73ffbf771..c7feecbc1f91f79306ea74d1c464f103b884acdb 100644 (file)
@@ -257,7 +257,7 @@ var webFXTreeHandler = {
        },
 
        textToHtml: function (s) {
-               return String(s).replace(/&|<|>|\n|\"\u00A0/g, this._textToHtml);
+               return String(s).replace(/&|<|>|\n|\"|\u00A0/g, this._textToHtml);
        },
 
        _textToHtml: function (s) {