0001-html-encoded-JSON-output.-I-don-t-actully-think-this.patch

Barney, 01/03/2010 02:56 pm

Download (1.3 KB)

 
b/app/controllers/videos_controller.rb
1 1
class VideosController < ContentController
2
include ERB::Util # used to html encode video titles in json.
2 3

  
3 4
  # Require SSL for certain actions, mostly having to do with form submissions
4 5
  #
......
92 93
    featured_vids = []
93 94
    videos.each do |video|
94 95
      featured_video = VideoSummary.new
95
      featured_video.title = video.title
96
      featured_video.title = html_escape(video.title)
96 97
      featured_video.id = video.id
97 98
      featured_video.file_path = video.file.url + '.small.jpg' #"/system/video/file/#{video.file_relative_path}.small.jpg"
98 99
      featured_vids << featured_video
99
-