fixed the safe_buffer issues
This commit is contained in:
parent
1ba49caeca
commit
df62f58156
7 changed files with 50 additions and 47 deletions
5
Gemfile
5
Gemfile
|
|
@ -3,7 +3,7 @@ source 'http://rubygems.org'
|
|||
gem 'mysql2', '0.2.6'
|
||||
#gem 'pg'
|
||||
#gem 'sqlite3'
|
||||
gem 'rails', '3.0.3'
|
||||
gem 'rails', '3.0.9'
|
||||
gem 'foreigner', '0.9.1'
|
||||
gem 'activerecord-import'
|
||||
|
||||
|
|
@ -32,7 +32,8 @@ gem 'faraday'
|
|||
gem 'faraday-stack'
|
||||
|
||||
#Views
|
||||
gem 'haml', '3.0.25'
|
||||
gem 'haml', '3.1.2'
|
||||
gem 'sass', '3.1.4'
|
||||
gem 'will_paginate', '3.0.pre2'
|
||||
|
||||
#Localization
|
||||
|
|
|
|||
71
Gemfile.lock
71
Gemfile.lock
|
|
@ -72,34 +72,41 @@ GEM
|
|||
Platform (0.4.0)
|
||||
SystemTimer (1.2.1)
|
||||
abstract (1.0.0)
|
||||
actionmailer (3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
mail (~> 2.2.9)
|
||||
actionpack (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
actionmailer (3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
mail (~> 2.2.19)
|
||||
actionpack (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
builder (~> 2.1.2)
|
||||
erubis (~> 2.6.6)
|
||||
i18n (~> 0.4)
|
||||
i18n (~> 0.5.0)
|
||||
rack (~> 1.2.1)
|
||||
rack-mount (~> 0.6.13)
|
||||
rack-test (~> 0.5.6)
|
||||
rack-mount (~> 0.6.14)
|
||||
rack-test (~> 0.5.7)
|
||||
tzinfo (~> 0.3.23)
|
||||
activemodel (3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
activemodel (3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
builder (~> 2.1.2)
|
||||
i18n (~> 0.4)
|
||||
activerecord (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
arel (~> 2.0.2)
|
||||
i18n (~> 0.5.0)
|
||||
activerecord (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
arel (~> 2.0.10)
|
||||
tzinfo (~> 0.3.23)
|
||||
<<<<<<< HEAD
|
||||
activerecord-import (0.2.7)
|
||||
activerecord (~> 3.0.0)
|
||||
activeresource (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
activesupport (3.0.3)
|
||||
=======
|
||||
activeresource (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
activesupport (3.0.9)
|
||||
>>>>>>> fixed the safe_buffer issues
|
||||
addressable (2.2.4)
|
||||
archive-tar-minitar (0.5.2)
|
||||
arel (2.0.10)
|
||||
|
|
@ -209,11 +216,11 @@ GEM
|
|||
gem_plugin (0.2.3)
|
||||
gherkin (2.3.10)
|
||||
json (>= 1.4.6)
|
||||
haml (3.0.25)
|
||||
haml (3.1.2)
|
||||
hashie (1.0.0)
|
||||
highline (1.6.2)
|
||||
http_connection (1.4.1)
|
||||
i18n (0.6.0)
|
||||
i18n (0.5.0)
|
||||
i18n-inflector (2.6.1)
|
||||
i18n (>= 0.4.1)
|
||||
i18n-inflector-rails (1.0.4)
|
||||
|
|
@ -328,25 +335,27 @@ GEM
|
|||
ruby-openid (>= 2.1.8)
|
||||
rack-test (0.5.7)
|
||||
rack (>= 1.0)
|
||||
rails (3.0.3)
|
||||
actionmailer (= 3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
activerecord (= 3.0.3)
|
||||
activeresource (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
rails (3.0.9)
|
||||
actionmailer (= 3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
activerecord (= 3.0.9)
|
||||
activeresource (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.0.3)
|
||||
railties (= 3.0.9)
|
||||
rails-i18n (0.1.0)
|
||||
activesupport (~> 3)
|
||||
railties (3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
railties (3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (~> 0.14.4)
|
||||
rake (0.9.2)
|
||||
rash (0.3.0)
|
||||
hashie (~> 1.0.0)
|
||||
rcov (0.9.9)
|
||||
rdoc (3.8)
|
||||
redis (2.2.0)
|
||||
redis-namespace (0.8.0)
|
||||
redis (< 3.0.0)
|
||||
|
|
@ -396,6 +405,7 @@ GEM
|
|||
archive-tar-minitar (>= 0.5.2)
|
||||
rubyntlm (0.1.1)
|
||||
rubyzip (0.9.4)
|
||||
sass (3.1.4)
|
||||
selenium-webdriver (0.2.2)
|
||||
childprocess (>= 0.1.9)
|
||||
ffi (>= 1.0.7)
|
||||
|
|
@ -475,7 +485,7 @@ DEPENDENCIES
|
|||
fog (= 0.3.25)
|
||||
foreigner (= 0.9.1)
|
||||
fuubar
|
||||
haml (= 3.0.25)
|
||||
haml (= 3.1.2)
|
||||
http_accept_language!
|
||||
i18n-inflector-rails (~> 1.0)
|
||||
jammit (= 0.5.4)
|
||||
|
|
@ -492,7 +502,7 @@ DEPENDENCIES
|
|||
oauth2-provider (= 0.0.16)
|
||||
ohai (= 0.5.8)
|
||||
omniauth (= 0.2.6)
|
||||
rails (= 3.0.3)
|
||||
rails (= 3.0.9)
|
||||
rails-i18n
|
||||
rcov
|
||||
resque (= 1.10.0)
|
||||
|
|
@ -505,6 +515,7 @@ DEPENDENCIES
|
|||
rspec-rails (>= 2.0.0)
|
||||
ruby-debug
|
||||
ruby-debug19
|
||||
sass (= 3.1.4)
|
||||
selenium-webdriver (= 0.2.2)
|
||||
settingslogic (= 2.0.6)
|
||||
sod!
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ class InvitationsController < Devise::InvitationsController
|
|||
user.accept_invitation!(params[:user])
|
||||
user.seed_aspects
|
||||
rescue Exception => e #What exception is this trying to rescue? If it is ActiveRecord::NotFound, we should say so.
|
||||
raise e
|
||||
user = nil
|
||||
record = e.record
|
||||
record.errors.delete(:person)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module MarkdownifyHelper
|
||||
def markdownify(message, options={})
|
||||
message = h(message).html_safe
|
||||
message = h(message).to_str
|
||||
|
||||
options[:newlines] = true if !options.has_key?(:newlines)
|
||||
options[:specialchars] = true if !options.has_key?(:specialchars)
|
||||
|
|
@ -17,7 +17,7 @@ module MarkdownifyHelper
|
|||
message = process_specialchars(message) if options[:specialchars]
|
||||
message = process_newlines(message) if options[:newlines]
|
||||
|
||||
message
|
||||
message.html_safe
|
||||
end
|
||||
|
||||
def process_newlines(message)
|
||||
|
|
@ -132,4 +132,4 @@ module MarkdownifyHelper
|
|||
end
|
||||
message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class StatusMessage < Post
|
|||
|
||||
def format_mentions(text, opts = {})
|
||||
regex = /@\{([^;]+); ([^\}]+)\}/
|
||||
form_message = text.gsub(regex) do |matched_string|
|
||||
form_message = text.to_str.gsub(regex) do |matched_string|
|
||||
people = self.mentioned_people
|
||||
person = people.detect{ |p|
|
||||
p.diaspora_handle == $~[2] unless p.nil?
|
||||
|
|
|
|||
|
|
@ -14,13 +14,3 @@ AVAILABLE_LANGUAGE_CODES.each do |c|
|
|||
I18n.fallbacks[c.to_sym] = [c.to_sym, DEFAULT_LANGUAGE.to_sym, :en]
|
||||
end
|
||||
end
|
||||
|
||||
# Workaround for https://rails.lighthouseapp.com/projects/8994/tickets/5329-using-i18nwith_locale-in-actionmailer-raises-systemstackerror
|
||||
module AbstractController
|
||||
class I18nProxy
|
||||
def initialize(i18n_config, lookup_context)
|
||||
@i18n_config, @lookup_context = i18n_config, lookup_context
|
||||
@i18n_config = @i18n_config.i18n_config if @i18n_config.respond_to?(:i18n_config)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ module Diaspora
|
|||
return text if opts[:plain_text]
|
||||
text = ERB::Util.h(text) unless opts[:no_escape]
|
||||
regex = /(^|\s)#(#{VALID_TAG_BODY})/
|
||||
form_message = text.gsub(regex) do |matched_string|
|
||||
form_message = text.to_str.gsub(regex) do |matched_string|
|
||||
"#{$~[1]}<a href=\"/tags/#{$~[2]}\" class=\"tag\">##{$~[2]}</a>"
|
||||
end
|
||||
form_message.html_safe
|
||||
|
|
|
|||
Loading…
Reference in a new issue