murlsh 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/murlsh.gemspec +2 -2
  3. data/public/js/js.js +15 -9
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
data/murlsh.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{murlsh}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew M. Boedicker"]
12
- s.date = %q{2010-01-15}
12
+ s.date = %q{2010-01-17}
13
13
  s.default_executable = %q{murlsh}
14
14
  s.description = %q{url sharing site framework with easy adding, title lookup, atom feed, thumbnails and embedding}
15
15
  s.email = %q{matthewm@boedicker.org}
data/public/js/js.js CHANGED
@@ -24,19 +24,25 @@ Murlsh.closer_add = function (x, header) {
24
24
  });
25
25
  };
26
26
 
27
+ Murlsh.escape_xml = function (s) {
28
+ return s.replace(/&/g, '&');
29
+ };
30
+
27
31
  Murlsh.object_tag = function (data, height, width, params) {
28
- var object = $('<object />').attr({
29
- data : data,
30
- height : height,
31
- type : 'application/x-shockwave-flash',
32
- width : width
33
- });
32
+ // this does not use jQuery to build tags because building object
33
+ // tags is broken in IE
34
+ var result = '<object data="' + Murlsh.escape_xml(data) +
35
+ '" height="' + height +
36
+ '" type="application/x-shockwave-flash" width="' + width + '">';
34
37
 
35
38
  $.each(params, function (i, v) {
36
- object.append($('<param />', v));
39
+ result += '<param name="' + v.name + '" value="' +
40
+ Murlsh.escape_xml(v.value) + '" />';
37
41
  });
38
42
 
39
- return object;
43
+ result += '</object>';
44
+
45
+ return result;
40
46
  };
41
47
 
42
48
  Murlsh.flickr_thumb = function (d) {
@@ -191,7 +197,7 @@ Murlsh.add_extra = function () {
191
197
  dataType : 'jsonp',
192
198
  success : function (d) {
193
199
  Murlsh.thumb_insert(Murlsh.vimeo_thumb(d).data('embed_html',
194
- d.html.replace(/&/g, '&amp;')),
200
+ Murlsh.escape_xml(d.html)),
195
201
  Murlsh.vimeo_click, $(this));
196
202
  },
197
203
  context : $(this)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: murlsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew M. Boedicker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 -05:00
12
+ date: 2010-01-17 00:00:00 -05:00
13
13
  default_executable: murlsh
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency