Commit 32f8637d authored by Anssi Piirainen's avatar Anssi Piirainen
Browse files

Merge pull request #54 from flowplayer/issue21

Issue #21: consistent clip url queries in json config and api
parents 9158a0da bcd58baf
......@@ -138,6 +138,10 @@
to[evt].push(fn);
}
// escape & and = in config written into flashvars (issue #21)
function queryescape(url) {
return url.replace(/&/g, '%26').replace(/&/g, '%26').replace(/=/g, '%3D');
}
// generates an unique id
function makeId() {
......@@ -977,6 +981,10 @@ function Player(wrapper, params, conf) {
conf.clip.url = wrapper.getAttribute("href", 2);
}
if (conf.clip.url) {
conf.clip.url = queryescape(conf.clip.url);
}
commonClip = new Clip(conf.clip, -1, self);
// playlist
......@@ -993,6 +1001,10 @@ function Player(wrapper, params, conf) {
clip = {url: "" + clip};
}
if (clip.url) {
clip.url = queryescape(clip.url);
}
// populate common clip properties to each clip
each(conf.clip, function(key, val) {
if (val !== undefined && clip[key] === undefined && typeof val != 'function') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment