14 Jan 2007 16:25
Patch to bxeConfig.js
Jean Jordaan <jean.jordaan <at> gmail.com>
2007-01-14 15:25:05 GMT
2007-01-14 15:25:05 GMT
Hi there
I needed to integrate the bitflux editor in Plone. While doing this I
found that the kupu editor adds some functions to Array.prototype, and
that this breaks BXE.
In bxeConfig.js, in the function bxeConfig.prototype.parseUrlParams
there is an iteration over the elements of an array. At the moment,
.split is called on every element. With the new members introduced by
kupu, there are now array elements that aren't strings, so .split raises
an error.
To avoid this, I test typeof p == "string" before trying the split.
I don't know if this is the best way, and there may be other vulnerable
spots in BXE. But for what it's worth, here's my patch to make BXE show
up in Plone:
=== js/bxeConfig.js
==================================================================
--- js/bxeConfig.js (revision 2939)
+++ js/bxeConfig.js (local)
<at> <at> -326,11 +326,13 <at> <at>
this.urlParams = new Array ();
var params =
window.location.search.substring(1,window.location.search.length).split("&");
var i = 0;
- for (var param in params)
- {
- var p = params[param].split("=");
(Continue reading)
RSS Feed