jbroadway / elefant

Elefant, the refreshingly simple PHP CMS and web framework.
http://www.elefantcms.com
MIT License
209 stars 39 forks source link

Incorrect escaping of dynamic objects inputs. #245

Closed pincher2012 closed 9 years ago

pincher2012 commented 9 years ago

jquery.dynamicobjects.js has function:

self.build_embed_string = function (handler, data) {
    var i, sep = '?', embed = handler;
    for (i in data) {
        embed += sep + i + '=' + escape (data[i]); //Problem here when encode utf-8 characters
        sep = '&';
    }
    return embed;
};

I can't edit dynamic object with cyrillic parameters after embedding. I propose to replace the function escape to encodeURIComponent.

https://github.com/jbroadway/elefant/pull/246

jbroadway commented 9 years ago

Just merged the PR so I'm closing this out too.