Browse Source

Escape `.`-character for proper matching.

Current regex, raw_data.match(".jsonp") would match any string that
contains "jsonp" with at least one preceding character, as . is
treated as a wild card. Escaping the . makes sure we only match
the actual string ".jsonp".
pull/291/head
Gunnar Lium 12 years ago
parent
commit
d051fc17ff
  1. 2
      source/js/VMM.Timeline.DataObj.js

2
source/js/VMM.Timeline.DataObj.js

@ -22,7 +22,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
trace("DATA SOURCE: STORIFY");
VMM.Timeline.DataObj.model.storify.getData(raw_data);
//http://api.storify.com/v1/stories/number10gov/g8-and-nato-chicago-summit
} else if (raw_data.match(".jsonp")) {
} else if (raw_data.match("\.jsonp")) {
trace("DATA SOURCE: JSONP");
LoadLib.js(raw_data, VMM.Timeline.DataObj.onJSONPLoaded);
} else {

Loading…
Cancel
Save