Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.md9
-rw-r--r--Gemfile11
-rw-r--r--Gemfile.lock36
-rw-r--r--app/assets/stylesheets/_application.scss1
-rw-r--r--app/assets/stylesheets/login.scss4
-rw-r--r--app/assets/stylesheets/navbar_left.scss13
-rw-r--r--app/assets/stylesheets/publisher.scss1
-rw-r--r--app/assets/stylesheets/sprites.scss5
-rw-r--r--app/helpers/notifier_helper.rb12
-rw-r--r--app/helpers/people_helper.rb29
-rw-r--r--app/mailers/export_mailer.rb37
-rw-r--r--app/mailers/maintenance.rb19
-rw-r--r--app/mailers/notification_mailers/base.rb13
-rw-r--r--app/mailers/notifier.rb29
-rw-r--r--app/mailers/report_mailer.rb5
-rw-r--r--app/views/devise/mailer/confirmation_instructions.html.haml6
-rw-r--r--app/views/devise/mailer/confirmation_instructions.markerb7
-rw-r--r--app/views/devise/mailer/confirmation_instructions.text.erb4
-rw-r--r--app/views/devise/mailer/invitation_instructions.markerb1
-rw-r--r--app/views/devise/mailer/reset_password_instructions.html.haml12
-rw-r--r--app/views/devise/mailer/reset_password_instructions.markerb13
-rw-r--r--app/views/devise/mailer/reset_password_instructions.text.erb11
-rw-r--r--app/views/devise/mailer/unlock_instructions.html.haml8
-rw-r--r--app/views/devise/mailer/unlock_instructions.markerb9
-rw-r--r--app/views/devise/mailer/unlock_instructions.text.erb6
-rw-r--r--app/views/layouts/notifier.html.haml2
-rw-r--r--app/views/layouts/notifier.text.haml5
-rw-r--r--app/views/maintenance/account_removal_warning.markerb2
-rw-r--r--app/views/notifier/_notifier_css.haml28
-rw-r--r--app/views/notifier/also_commented.html.haml4
-rw-r--r--app/views/notifier/also_commented.markerb5
-rw-r--r--app/views/notifier/also_commented.text.erb4
-rw-r--r--app/views/notifier/comment_on_post.html.haml4
-rw-r--r--app/views/notifier/comment_on_post.markerb5
-rw-r--r--app/views/notifier/comment_on_post.text.erb4
-rw-r--r--app/views/notifier/confirm_email.html.haml6
-rw-r--r--app/views/notifier/confirm_email.markerb5
-rw-r--r--app/views/notifier/confirm_email.text.erb5
-rw-r--r--app/views/notifier/contacts_birthday.html.haml5
-rw-r--r--app/views/notifier/contacts_birthday.markerb6
-rw-r--r--app/views/notifier/contacts_birthday.text.erb4
-rw-r--r--app/views/notifier/csrf_token_fail.html.haml4
-rw-r--r--app/views/notifier/csrf_token_fail.markerb1
-rw-r--r--app/views/notifier/csrf_token_fail.text.erb3
-rw-r--r--app/views/notifier/invite.markerb6
-rw-r--r--app/views/notifier/liked.html.haml10
-rw-r--r--app/views/notifier/liked.markerb11
-rw-r--r--app/views/notifier/liked.text.erb10
-rw-r--r--app/views/notifier/mentioned.html.haml9
-rw-r--r--app/views/notifier/mentioned.markerb9
-rw-r--r--app/views/notifier/mentioned.text.erb8
-rw-r--r--app/views/notifier/mentioned_in_comment.html.haml9
-rw-r--r--app/views/notifier/mentioned_in_comment.text.erb (renamed from app/views/notifier/mentioned_in_comment.markerb)5
-rw-r--r--app/views/notifier/plain_markdown_email.html.haml2
-rw-r--r--app/views/notifier/plain_markdown_email.text.haml1
-rw-r--r--app/views/notifier/private_message.html.haml4
-rw-r--r--app/views/notifier/private_message.markerb5
-rw-r--r--app/views/notifier/private_message.text.erb4
-rw-r--r--app/views/notifier/reshared.html.haml5
-rw-r--r--app/views/notifier/reshared.markerb7
-rw-r--r--app/views/notifier/reshared.text.erb6
-rw-r--r--app/views/notifier/single_admin.html.haml8
-rw-r--r--app/views/notifier/single_admin.markerb7
-rw-r--r--app/views/notifier/single_admin.text.erb6
-rw-r--r--app/views/notifier/started_sharing.html.haml7
-rw-r--r--app/views/notifier/started_sharing.markerb5
-rw-r--r--app/views/notifier/started_sharing.text.erb4
-rw-r--r--app/views/report/report_email.markerb5
-rw-r--r--app/views/users/export_email.markerb1
-rw-r--r--app/views/users/export_failure_email.markerb1
-rw-r--r--app/views/users/export_photos_email.markerb1
-rw-r--r--app/views/users/export_photos_failure_email.markerb1
-rw-r--r--app/workers/export_photos.rb5
-rw-r--r--config/initializers/entypo.rb3
-rw-r--r--config/initializers/markerb.rb3
-rw-r--r--config/locales/diaspora/en.yml4
-rw-r--r--lib/diaspora/mentionable.rb24
-rw-r--r--lib/diaspora/message_renderer.rb32
-rw-r--r--spec/helpers/notifier_helper_spec.rb28
-rw-r--r--spec/helpers/people_helper_spec.rb2
-rw-r--r--spec/lib/diaspora/mentionable_spec.rb10
-rw-r--r--spec/lib/diaspora/message_renderer_spec.rb8
-rw-r--r--spec/mailers/notifier_spec.rb40
-rw-r--r--spec/workers/reset_password_spec.rb4
-rw-r--r--vendor/assets/entypo/LICENSE_ENTYPO95
-rw-r--r--vendor/assets/entypo/entypo.scss311
-rw-r--r--vendor/assets/entypo/entypo.woffbin0 -> 45828 bytes
87 files changed, 757 insertions, 372 deletions
diff --git a/Changelog.md b/Changelog.md
index 0dc6ca055..423960738 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -36,17 +36,24 @@ Although the chat was never enabled per default and was marked as experimental,
* For pods running PostgreSQL, make sure that no upper-case/mixed-case tags exist, and create a `lower(name)` index on tags to speed up ActsAsTaggableOn [#8206](https://github.com/diaspora/diaspora/pull/8206)
* Allow podmins/moderators to see all local public posts to improve moderation [#8232](https://github.com/diaspora/diaspora/pull/8232) [#8320](https://github.com/diaspora/diaspora/pull/8320)
* Add support for directly paste images to upload them [#8237](https://github.com/diaspora/diaspora/pull/8237)
+* Add support for webp images and convert new png/jpg to webp to save space and bandwidth [#8358](https://github.com/diaspora/diaspora/pull/8358)
# 0.7.18.0
## Refactor
* Fix order-dependent jasmine test failures and switch to random order [#8333](https://github.com/diaspora/diaspora/pull/8333)
-* Get rid of some uses of "execute_script" in feature specs [#8331](https://github.com/diaspora/diaspora/pull/8331)
+* Get rid of some uses of "execute\_script" in feature specs [#8331](https://github.com/diaspora/diaspora/pull/8331)
* Fix deprecation warnings for sidekiq 7.0 [#8359](https://github.com/diaspora/diaspora/pull/8359)
+* Remove entypo-rails dependency to prepare for rails 6 [#8361](https://github.com/diaspora/diaspora/pull/8361)
+* Remove compass-rails dependency which is not supported anymore [#8362](https://github.com/diaspora/diaspora/pull/8362)
+* Remove markerb dependency which doesn't exist anymore [#8365](https://github.com/diaspora/diaspora/pull/8365)
## Bug fixes
+* Fix that no mails were sent after photo export [#8365](https://github.com/diaspora/diaspora/pull/8365)
+* Fix people with quotes in the name causing issues with mail sender [#8365](https://github.com/diaspora/diaspora/pull/8365)
## Features
+* Render posts and comments as HTML in HTML mails [#8365](https://github.com/diaspora/diaspora/pull/8365)
# 0.7.17.0
diff --git a/Gemfile b/Gemfile
index 4a5918ca4..36f1e1fba 100644
--- a/Gemfile
+++ b/Gemfile
@@ -63,8 +63,7 @@ gem "rack-cors", "1.1.1", require: "rack/cors"
gem "autoprefixer-rails", "10.4.7.0"
gem "bootstrap-sass", "3.4.1"
gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 and 3.3.5 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691
-gem "compass-rails", "3.1.0"
-gem "sass-rails", "5.0.7"
+gem "sassc-rails", "2.1.2"
gem "sprockets-rails", "3.4.2"
# Database
@@ -87,10 +86,6 @@ gem "mini_magick", "4.11.0"
# GUID generation
gem "uuid", "2.3.9"
-# Icons
-
-gem "entypo-rails", "3.0.0"
-
# JavaScript
gem "handlebars_assets", "0.23.9"
@@ -139,10 +134,6 @@ gem "http_accept_language", "2.1.1"
gem "i18n-inflector-rails", "1.0.7"
gem "rails-i18n", "5.1.3"
-# Mail
-
-gem "markerb", "1.1.0"
-
# Map
gem "leaflet-rails", "1.7.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 64d0a6154..6ff75515c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -127,22 +127,6 @@ GEM
chunky_png (1.4.0)
citrus (3.0.2)
coderay (1.1.3)
- compass (1.0.3)
- chunky_png (~> 1.2)
- compass-core (~> 1.0.2)
- compass-import-once (~> 1.0.5)
- rb-fsevent (>= 0.9.3)
- rb-inotify (>= 0.9)
- sass (>= 3.3.13, < 3.5)
- compass-core (1.0.3)
- multi_json (~> 1.0)
- sass (>= 3.3.0, < 3.5)
- compass-import-once (1.0.5)
- sass (>= 3.2, < 3.5)
- compass-rails (3.1.0)
- compass (~> 1.0.0)
- sass-rails (< 5.1)
- sprockets (< 4.0)
concurrent-ruby (1.1.10)
configurate (0.5.0)
connection_pool (2.2.5)
@@ -228,8 +212,6 @@ GEM
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
encryptor (3.0.0)
- entypo-rails (3.0.0)
- railties (>= 4.1, < 6)
equalizer (0.0.11)
erubi (1.10.0)
eslintrb (2.1.0)
@@ -401,7 +383,6 @@ GEM
mini_mime (>= 0.1.1)
marcel (1.0.2)
markdown-it-html5-embed (1.0.0)
- markerb (1.1.0)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
method_source (1.0.0)
@@ -657,14 +638,14 @@ GEM
rubyzip (2.3.2)
rugged (1.0.1)
sass (3.4.25)
- sass-rails (5.0.7)
- railties (>= 4.0.0, < 6)
- sass (~> 3.1)
- sprockets (>= 2.8, < 4.0)
- sprockets-rails (>= 2.0, < 4.0)
- tilt (>= 1.1, < 3)
sassc (2.4.0)
ffi (~> 1.9)
+ sassc-rails (2.1.2)
+ railties (>= 4.0.0)
+ sassc (>= 2.0)
+ sprockets (> 3.0)
+ sprockets-rails
+ tilt
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
@@ -806,7 +787,6 @@ DEPENDENCIES
capybara (= 3.35.3)
carrierwave (= 2.2.2)
chrome_remote (= 0.3.0)
- compass-rails (= 3.1.0)
configurate (= 0.5.0)
cucumber-api-steps (= 0.14)
cucumber-rails (= 2.5.1)
@@ -817,7 +797,6 @@ DEPENDENCIES
diaspora_federation-json_schema (= 0.2.7)
diaspora_federation-rails (= 0.2.7)
diaspora_federation-test (= 0.2.7)
- entypo-rails (= 3.0.0)
eye (= 0.10.0)
factory_bot_rails (= 6.1.0)
faraday (= 0.17.5)
@@ -844,7 +823,6 @@ DEPENDENCIES
listen (= 3.7.1)
logging-rails (= 0.6.0)
markdown-it-html5-embed (= 1.0.0)
- markerb (= 1.1.0)
mini_magick (= 4.11.0)
minitest (= 5.15.0)
mobile-fu (= 1.4.0)
@@ -908,7 +886,7 @@ DEPENDENCIES
rubocop-rails (= 2.9.1)
ruby-oembed (= 0.16.1)
rubyzip (= 2.3.2)
- sass-rails (= 5.0.7)
+ sassc-rails (= 2.1.2)
secure_headers (= 6.3.3)
shoulda-matchers (= 4.5.1)
sidekiq (= 6.4.2)
diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss
index ae8ca9c06..b032ae28c 100644
--- a/app/assets/stylesheets/_application.scss
+++ b/app/assets/stylesheets/_application.scss
@@ -11,7 +11,6 @@
@import 'icons';
@import 'animations';
@import 'flash_messages';
-@import 'sprites';
@import 'hovercard';
@import 'base';
@import 'interactions';
diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss
index bdb62a343..13a8c0757 100644
--- a/app/assets/stylesheets/login.scss
+++ b/app/assets/stylesheets/login.scss
@@ -5,9 +5,9 @@
padding-top: 25px;
.logos-asterisk {
+ background: image-url('branding/logos/asterisk.png') no-repeat;
height: 154px;
- margin: auto;
- margin-bottom: 12px;
+ margin: auto auto 12px;
width: 154px;
}
diff --git a/app/assets/stylesheets/navbar_left.scss b/app/assets/stylesheets/navbar_left.scss
index 3fde9e3a8..6d062bf3a 100644
--- a/app/assets/stylesheets/navbar_left.scss
+++ b/app/assets/stylesheets/navbar_left.scss
@@ -202,10 +202,23 @@
.social-media-logos-twitter-24x24,
.social-media-logos-tumblr-24x24,
.social-media-logos-wordpress-24x24 {
+ background-repeat: no-repeat;
height: 24px;
width: 24px;
}
+ .social-media-logos-twitter-24x24 {
+ background-image: image-url('social-media-logos/twitter-24x24.png');
+ }
+
+ .social-media-logos-tumblr-24x24 {
+ background-image: image-url('social-media-logos/tumblr-24x24.png');
+ }
+
+ .social-media-logos-wordpress-24x24 {
+ background-image: image-url('social-media-logos/wordpress-24x24.png');
+ }
+
a {
display: inline-block;
}
diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss
index 6db248519..e07293d25 100644
--- a/app/assets/stylesheets/publisher.scss
+++ b/app/assets/stylesheets/publisher.scss
@@ -43,6 +43,7 @@
.btn.btn-link.question_mark:hover .entypo-cog { color: $black; }
.dim { opacity: 0.3; }
.social-media-logos-wordpress-16x16 {
+ background: image-url('social-media-logos/wordpress-16x16.png') no-repeat;
display: inline-block;
height: 16px;
width: 16px;
diff --git a/app/assets/stylesheets/sprites.scss b/app/assets/stylesheets/sprites.scss
deleted file mode 100644
index 981e20cc3..000000000
--- a/app/assets/stylesheets/sprites.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-/* ===== sprites ===== */
-@import 'branding/logos/*.png';
-@import 'social-media-logos/*.png';
-@include all-logos-sprites;
-@include all-social-media-logos-sprites;
diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb
index e7a05af5f..9edcea043 100644
--- a/app/helpers/notifier_helper.rb
+++ b/app/helpers/notifier_helper.rb
@@ -4,21 +4,19 @@ module NotifierHelper
include PostsHelper
# @param post [Post] The post object.
- # @param opts [Hash] Optional hash. Accepts :length parameters.
+ # @param opts [Hash] Optional hash. Accepts :html parameter.
# @return [String] The formatted post.
def post_message(post, opts={})
- if post.respond_to? :message
- post.message.try(:plain_text_without_markdown).presence || post_page_title(post)
- else
- I18n.translate "notifier.a_post_you_shared"
- end
+ rendered = opts[:html] ? post.message&.markdownified_for_mail : post.message&.plain_text_without_markdown
+ rendered.presence || post_page_title(post)
end
# @param comment [Comment] The comment to process.
+ # @param opts [Hash] Optional hash. Accepts :html parameter.
# @return [String] The formatted comment.
def comment_message(comment, opts={})
if comment.post.public?
- comment.message.plain_text_without_markdown
+ opts[:html] ? comment.message.markdownified_for_mail : comment.message.plain_text_without_markdown
else
I18n.translate "notifier.a_limited_post_comment"
end
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index 1a08bd6af..16b8eb823 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -27,10 +27,10 @@ module PeopleHelper
def person_link(person, opts={})
css_class = person_link_class(person, opts[:class])
- remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
- "<a data-hovercard='#{remote_or_hovercard_link}' href='#{remote_or_hovercard_link}' class='#{css_class}'>"\
- "#{html_escape_once(opts[:display_name] || person.name)}</a>"\
- .html_safe
+ remote_or_hovercard_link = person_path(person)
+ tag.a('data-hovercard': remote_or_hovercard_link, href: remote_or_hovercard_link, class: css_class) do
+ opts[:display_name] || person.name
+ end
end
def person_image_tag(person, size = :thumb_small)
@@ -44,15 +44,12 @@ module PeopleHelper
if opts[:to] == :photos
link_to person_image_tag(person, opts[:size]), person_photos_path(person)
else
- css_class = person_link_class(person, opts[:class])
- remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
- "<a href='#{remote_or_hovercard_link}' class='#{css_class}' #{('target=' + opts[:target]) if opts[:target]}>
- #{person_image_tag(person, opts[:size])}
- </a>".html_safe
+ tag.a(href: person_path(person), class: person_link_class(person, opts[:class])) do
+ person_image_tag(person, opts[:size])
+ end
end
end
- # Rails.application.routes.url_helpers is needed since this is indirectly called from a model
def local_or_remote_person_path(person, opts={})
opts.merge!(:protocol => AppConfig.pod_uri.scheme, :host => AppConfig.pod_uri.authority)
absolute = opts.delete(:absolute)
@@ -61,19 +58,11 @@ module PeopleHelper
username = person.username
unless username.include?('.')
opts.merge!(:username => username)
- if absolute
- return Rails.application.routes.url_helpers.user_profile_url(opts)
- else
- return Rails.application.routes.url_helpers.user_profile_path(opts)
- end
+ return absolute ? user_profile_url(opts) : user_profile_path(opts)
end
end
- if absolute
- return Rails.application.routes.url_helpers.person_url(person, opts)
- else
- return Rails.application.routes.url_helpers.person_path(person, opts)
- end
+ absolute ? person_url(person, opts) : person_path(person, opts)
end
private
diff --git a/app/mailers/export_mailer.rb b/app/mailers/export_mailer.rb
index da4af5f30..e7219353d 100644
--- a/app/mailers/export_mailer.rb
+++ b/app/mailers/export_mailer.rb
@@ -2,38 +2,31 @@
class ExportMailer < ApplicationMailer
def export_complete_for(user)
- @user = user
-
- mail(to: @user.email, subject: I18n.t('notifier.export_email.subject', name: @user.name)) do |format|
- format.html { render 'users/export_email' }
- format.text { render 'users/export_email' }
- end
+ send_mail(user, I18n.t("notifier.export_email.subject", name: user.name),
+ I18n.t("notifier.export_email.body", url: download_profile_user_url, name: user.first_name))
end
def export_failure_for(user)
- @user = user
-
- mail(to: @user.email, subject: I18n.t('notifier.export_failure_email.subject', name: @user.name)) do |format|
- format.html { render 'users/export_failure_email' }
- format.text { render 'users/export_failure_email' }
- end
+ send_mail(user, I18n.t("notifier.export_failure_email.subject", name: user.name),
+ I18n.t("notifier.export_failure_email.body", name: user.first_name))
end
def export_photos_complete_for(user)
- @user = user
-
- mail(to: @user.email, subject: I18n.t('notifier.export_photos_email.subject', name: @user.name)) do |format|
- format.html { render 'users/export_photos_email' }
- format.text { render 'users/export_photos_email' }
- end
+ send_mail(user, I18n.t("notifier.export_photos_email.subject", name: user.name),
+ I18n.t("notifier.export_photos_email.body", url: download_photos_user_url, name: user.first_name))
end
def export_photos_failure_for(user)
- @user = user
+ send_mail(user, I18n.t("notifier.export_photos_failure_email.subject", name: user.name),
+ I18n.t("notifier.export_photos_failure_email.body", name: user.first_name))
+ end
+
+ private
- mail(to: @user.email, subject: I18n.t('notifier.export_photos_failure_email.subject', name: @user.name)) do |format|
- format.html { render 'users/export_photos_failure_email' }
- format.text { render 'users/export_photos_failure_email' }
+ def send_mail(user, subject, body)
+ mail(to: user.email, subject: subject) do |format|
+ format.html { render "notifier/plain_markdown_email", locals: {body: body} }
+ format.text { render "notifier/plain_markdown_email", locals: {body: body} }
end
end
end
diff --git a/app/mailers/maintenance.rb b/app/mailers/maintenance.rb
index 1ff5d4ac3..5c23ce53d 100644
--- a/app/mailers/maintenance.rb
+++ b/app/mailers/maintenance.rb
@@ -2,16 +2,15 @@
class Maintenance < ApplicationMailer
def account_removal_warning(user)
- @user = user
- @login_url = new_user_session_url
- @pod_url = AppConfig.environment.url
- @after_days = AppConfig.settings.maintenance.remove_old_users.after_days.to_s
- @remove_after = @user.remove_after
-
- I18n.with_locale(@user.language) do
- mail(to: @user.email, subject: I18n.t("notifier.remove_old_user.subject")) do |format|
- format.text
- format.html
+ I18n.with_locale(user.language) do
+ body = I18n.t("notifier.remove_old_user.body",
+ pod_url: AppConfig.environment.url,
+ login_url: new_user_session_url,
+ after_days: AppConfig.settings.maintenance.remove_old_users.after_days.to_s,
+ remove_after: user.remove_after)
+ mail(to: user.email, subject: I18n.t("notifier.remove_old_user.subject")) do |format|
+ format.text { render "notifier/plain_markdown_email", locals: {body: body} }
+ format.html { render "notifier/plain_markdown_email", locals: {body: body} }
end
end
end
diff --git a/app/mailers/notification_mailers/base.rb b/app/mailers/notification_mailers/base.rb
index 8aa3d28c6..e4f56eb4b 100644
--- a/app/mailers/notification_mailers/base.rb
+++ b/app/mailers/notification_mailers/base.rb
@@ -35,16 +35,13 @@ module NotificationMailers
private
def default_headers
- headers = {
- from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>",
- host: "#{AppConfig.pod_uri.host}",
+ from_name = AppConfig.settings.pod_name
+ from_name += " (#{@sender.profile.full_name.empty? ? @sender.username : @sender.name})" if @sender.present?
+
+ {
+ from: name_and_address(from_name, AppConfig.mail.sender_address),
to: name_and_address(@recipient.name, @recipient.email)
}
- return headers if @sender.blank?
- sender_in_header = @sender.profile.full_name.empty? ? @sender.username : @sender.name
- headers[:from] = "\"#{AppConfig.settings.pod_name} (#{sender_in_header})\" <#{AppConfig.mail.sender_address}>"
-
- headers
end
def with_recipient_locale(&block)
diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb
index 47c3b71bf..977883985 100644
--- a/app/mailers/notifier.rb
+++ b/app/mailers/notifier.rb
@@ -24,33 +24,28 @@ class Notifier < ApplicationMailer
}
end
- unless subject
- subject = I18n.t('notifier.single_admin.subject')
- end
+ subject ||= I18n.t("notifier.single_admin.subject")
- default_opts = {:to => @receiver.email,
- :from => AppConfig.mail.sender_address,
- :subject => subject, :host => AppConfig.pod_uri.host}
+ default_opts = {to: @receiver.email, from: AppConfig.mail.sender_address, subject: subject}
default_opts.merge!(opts)
- mail(default_opts) do |format|
- format.text
- format.html
- end
+ mail(default_opts)
end
def invite(email, inviter, invitation_code, locale)
- @inviter = inviter
- @invitation_code = invitation_code
-
I18n.with_locale(locale) do
mail_opts = {to: email, from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>",
- subject: I18n.t("notifier.invited_you", name: @inviter.name),
- host: AppConfig.pod_uri.host}
+ subject: I18n.t("notifier.invited_you", name: inviter.name)}
+ name = inviter.full_name.empty? ? inviter.diaspora_handle : "#{inviter.name} (#{inviter.diaspora_handle})"
+ body = I18n.t("notifier.invite.message",
+ invite_url: invite_code_url(invitation_code),
+ diasporafoundation_url: "https://diasporafoundation.org/",
+ user: name,
+ diaspora_id: inviter.diaspora_handle)
mail(mail_opts) do |format|
- format.text { render :layout => nil }
- format.html { render :layout => nil }
+ format.text { render "notifier/plain_markdown_email", layout: nil, locals: {body: body} }
+ format.html { render "notifier/plain_markdown_email", layout: nil, locals: {body: body} }
end
end
end
diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb
index 507e02600..ad69332fd 100644
--- a/app/mailers/report_mailer.rb
+++ b/app/mailers/report_mailer.rb
@@ -26,9 +26,10 @@ class ReportMailer < ApplicationMailer
private
def format(resource)
+ body = I18n.t("notifier.report_email.body", resource)
mail(to: resource[:email], subject: I18n.t("notifier.report_email.subject", type: resource[:type])) do |format|
- format.html { render "report/report_email", locals: {resource: resource} }
- format.text { render "report/report_email", locals: {resource: resource} }
+ format.html { render "notifier/plain_markdown_email", locals: {body: body} }
+ format.text { render "notifier/plain_markdown_email", locals: {body: body} }
end
end
end
diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml
new file mode 100644
index 000000000..f1824c54f
--- /dev/null
+++ b/app/views/devise/mailer/confirmation_instructions.html.haml
@@ -0,0 +1,6 @@
+%p
+ = t("devise.mailer.welcome", username: @resource.username)
+%p
+ = t(".you_can_confirm")
+%p
+ = link_to t(".confirm"), confirmation_url(@resource, confirmation_token: @token)
diff --git a/app/views/devise/mailer/confirmation_instructions.markerb b/app/views/devise/mailer/confirmation_instructions.markerb
deleted file mode 100644
index 6e0211f1f..000000000
--- a/app/views/devise/mailer/confirmation_instructions.markerb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t('devise.mailer.welcome', username: @resource.username) %>
-
-<%= t('.you_can_confirm') %>
-
-[<%= t('.confirm') %>][1]
-
-[1]: <%= confirmation_url(@resource, confirmation_token: @token) %>
diff --git a/app/views/devise/mailer/confirmation_instructions.text.erb b/app/views/devise/mailer/confirmation_instructions.text.erb
new file mode 100644
index 000000000..9ce086053
--- /dev/null
+++ b/app/views/devise/mailer/confirmation_instructions.text.erb
@@ -0,0 +1,4 @@
+<%= t("devise.mailer.welcome", username: @resource.username) %>
+
+<%= t(".you_can_confirm") %>
+<%= confirmation_url(@resource, confirmation_token: @token) %>
diff --git a/app/views/devise/mailer/invitation_instructions.markerb b/app/views/devise/mailer/invitation_instructions.markerb
deleted file mode 100644
index 8d39da1c6..000000000
--- a/app/views/devise/mailer/invitation_instructions.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t('.message', :invite_url => invite_code_url(@invitation_code)) %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml
new file mode 100644
index 000000000..0c8f44a3f
--- /dev/null
+++ b/app/views/devise/mailer/reset_password_instructions.html.haml
@@ -0,0 +1,12 @@
+%p
+ = t("devise.mailer.hello", username: @resource.username)
+%p
+ = t(".someone_requested")
+%p
+ = link_to t(".change"), edit_password_url(@resource, reset_password_token: @token)
+%p
+ = t(".then_connect", username: @resource.username)
+%p
+ = t(".wont_change")
+%p
+ = t(".ignore")
diff --git a/app/views/devise/mailer/reset_password_instructions.markerb b/app/views/devise/mailer/reset_password_instructions.markerb
deleted file mode 100644
index ac800dd25..000000000
--- a/app/views/devise/mailer/reset_password_instructions.markerb
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= t('devise.mailer.hello', username: @resource.username) %>
-
-<%= t('.someone_requested') %>
-
-[<%= t('.change') %>][1]
-
-[1]: <%= edit_password_url(@resource, reset_password_token: @token) %>
-
-<%= t('.then_connect', username: @resource.username) %>
-
-<%= t('.wont_change') %>
-
-<%= t('.ignore') %>
diff --git a/app/views/devise/mailer/reset_password_instructions.text.erb b/app/views/devise/mailer/reset_password_instructions.text.erb
new file mode 100644
index 000000000..48f1dfee4
--- /dev/null
+++ b/app/views/devise/mailer/reset_password_instructions.text.erb
@@ -0,0 +1,11 @@
+<%= t("devise.mailer.hello", username: @resource.username) %>
+
+<%= t(".someone_requested") %>
+
+<%= t(".change") %>: <%= edit_password_url(@resource, reset_password_token: @token) %>
+
+<%= t(".then_connect", username: @resource.username) %>
+
+<%= t(".wont_change") %>
+
+<%= t(".ignore") %>
diff --git a/app/views/devise/mailer/unlock_instructions.html.haml b/app/views/devise/mailer/unlock_instructions.html.haml
new file mode 100644
index 000000000..c16e8dee7
--- /dev/null
+++ b/app/views/devise/mailer/unlock_instructions.html.haml
@@ -0,0 +1,8 @@
+%p
+ = t("devise.mailer.hello", username: @resource.username)
+%p
+ = t(".account_locked")
+%p
+ = t(".click_to_unlock")
+%p
+ = link_to t(".unlock"), unlock_url(@resource, unlock_token: @token)
diff --git a/app/views/devise/mailer/unlock_instructions.markerb b/app/views/devise/mailer/unlock_instructions.markerb
deleted file mode 100644
index d207a1bb9..000000000
--- a/app/views/devise/mailer/unlock_instructions.markerb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= t('devise.mailer.hello', username: @resource.username) %>
-
-<%= t('.account_locked') %>
-
-<%= t('.click_to_unlock') %>
-
-[<%= t('.unlock') %>][1]
-
-[1]: <%= unlock_url(@resource, unlock_token: @token) %>
diff --git a/app/views/devise/mailer/unlock_instructions.text.erb b/app/views/devise/mailer/unlock_instructions.text.erb
new file mode 100644
index 000000000..e89aa4353
--- /dev/null
+++ b/app/views/devise/mailer/unlock_instructions.text.erb
@@ -0,0 +1,6 @@
+<%= t("devise.mailer.hello", username: @resource.username) %>
+
+<%= t(".account_locked") %>
+
+<%= t(".click_to_unlock") %>
+<%= unlock_url(@resource, unlock_token: @token) %>
diff --git a/app/views/layouts/notifier.html.haml b/app/views/layouts/notifier.html.haml
index 12172a606..c547f285c 100644
--- a/app/views/layouts/notifier.html.haml
+++ b/app/views/layouts/notifier.html.haml
@@ -1,7 +1,7 @@
%table{cellspacing: 0, cellpadding: 0, border: 0,
style: "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px"}
%tr
- - if @notification.try(:sender)
+ - if @notification&.sender.present?
%td{width: "60px", style: "vertical-align: top"}>
%div{style: "background-color: #eee; height: 50px; width: 50px"}
= image_tag @notification.sender.profile.image_url(size: :thumb_small), alt: @notification.sender.name,
diff --git a/app/views/layouts/notifier.text.haml b/app/views/layouts/notifier.text.haml
index e018e0311..8a7a083a5 100644
--- a/app/views/layouts/notifier.text.haml
+++ b/app/views/layouts/notifier.text.haml
@@ -1,4 +1,5 @@
!= yield
+
+!= "-- "
!= t("notifier.email_sent_by_diaspora", pod_name: pod_name)
-!= t("notifier.to_change_your_notification_settings")
-!= edit_user_url
+!= "#{t('notifier.to_change_your_notification_settings')}: #{edit_user_url}"
diff --git a/app/views/maintenance/account_removal_warning.markerb b/app/views/maintenance/account_removal_warning.markerb
deleted file mode 100644
index 7303bafae..000000000
--- a/app/views/maintenance/account_removal_warning.markerb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= t('notifier.remove_old_user.body', pod_url: @pod_url, login_url: @login_url, after_days: @after_days, remove_after: @remove_after) %>
-
diff --git a/app/views/notifier/_notifier_css.haml b/app/views/notifier/_notifier_css.haml
deleted file mode 100644
index 4ca518b2d..000000000
--- a/app/views/notifier/_notifier_css.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-:css
- body{
- width:600px;
- font-family: 'Helvetica',sans-serif;
- }
- #container{
- }
- header{
- margin-bottom: 25px;
- }
- p{
- padding:5px;
- }
- p.small{
- font-size:smaller;
- color:#999;
- font-style:italic;
- }
- a{
- color:#107FC9;
- font-weight:bold;
- }
- a:hover{
- color: #22AAE0;
- }
- a:active{
- color: #005D9C;
- }
diff --git a/app/views/notifier/also_commented.html.haml b/app/views/notifier/also_commented.html.haml
new file mode 100644
index 000000000..ec6fdfc94
--- /dev/null
+++ b/app/views/notifier/also_commented.html.haml
@@ -0,0 +1,4 @@
+= comment_message(@notification.comment, html: true)
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/also_commented.markerb b/app/views/notifier/also_commented.markerb
deleted file mode 100644
index 8c5023664..000000000
--- a/app/views/notifier/also_commented.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= comment_message(@notification.comment, :process_newlines => true) %>
-
-[<%= t('notifier.comment_on_post.reply', :name => @notification.comment_post.author_first_name) %>][1]
-
-[1]: <%= post_url(@notification.comment_post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/also_commented.text.erb b/app/views/notifier/also_commented.text.erb
new file mode 100644
index 000000000..bce14edd8
--- /dev/null
+++ b/app/views/notifier/also_commented.text.erb
@@ -0,0 +1,4 @@
+<%= comment_message(@notification.comment) %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name) %>
+<%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/comment_on_post.html.haml b/app/views/notifier/comment_on_post.html.haml
new file mode 100644
index 000000000..ec6fdfc94
--- /dev/null
+++ b/app/views/notifier/comment_on_post.html.haml
@@ -0,0 +1,4 @@
+= comment_message(@notification.comment, html: true)
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/comment_on_post.markerb b/app/views/notifier/comment_on_post.markerb
deleted file mode 100644
index 7d4d86802..000000000
--- a/app/views/notifier/comment_on_post.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= comment_message(@notification.comment, :process_newlines => true) %>
-
-[<%= t('notifier.comment_on_post.reply', :name => @notification.comment.parent_author_name) %>][1]
-
-[1]: <%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/comment_on_post.text.erb b/app/views/notifier/comment_on_post.text.erb
new file mode 100644
index 000000000..bce14edd8
--- /dev/null
+++ b/app/views/notifier/comment_on_post.text.erb
@@ -0,0 +1,4 @@
+<%= comment_message(@notification.comment) %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name) %>
+<%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/confirm_email.html.haml b/app/views/notifier/confirm_email.html.haml
new file mode 100644
index 000000000..87e334688
--- /dev/null
+++ b/app/views/notifier/confirm_email.html.haml
@@ -0,0 +1,6 @@
+%p
+ = t("notifier.hello", name: @notification.recipient_first_name)
+%p
+ = t("notifier.confirm_email.click_link", unconfirmed_email: @notification.recipient_unconfirmed_email)
+%p
+ = link_to nil, confirm_email_url(token: @notification.recipient_confirm_email_token)
diff --git a/app/views/notifier/confirm_email.markerb b/app/views/notifier/confirm_email.markerb
deleted file mode 100644
index 6b32bfa0a..000000000
--- a/app/views/notifier/confirm_email.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t('notifier.hello', :name => @notification.recipient_first_name) %>
-
-<%= t('notifier.confirm_email.click_link', :unconfirmed_email => @notification.recipient_unconfirmed_email) %>
-
-<<%= confirm_email_url(:token => @notification.recipient_confirm_email_token) %>>
diff --git a/app/views/notifier/confirm_email.text.erb b/app/views/notifier/confirm_email.text.erb
new file mode 100644
index 000000000..4b310db63
--- /dev/null
+++ b/app/views/notifier/confirm_email.text.erb
@@ -0,0 +1,5 @@
+<%= t("notifier.hello", name: @notification.recipient_first_name) %>
+
+<%= t("notifier.confirm_email.click_link", unconfirmed_email: @notification.recipient_unconfirmed_email) %>
+
+<%= confirm_email_url(token: @notification.recipient_confirm_email_token) %>
diff --git a/app/views/notifier/contacts_birthday.html.haml b/app/views/notifier/contacts_birthday.html.haml
new file mode 100644
index 000000000..4402cf41d
--- /dev/null
+++ b/app/views/notifier/contacts_birthday.html.haml
@@ -0,0 +1,5 @@
+%p
+ = t(".birthday", name: @notification.person.name)
+%p
+ = link_to t(".view_profile", name: @notification.person.first_name),
+ local_or_remote_person_path(@notification.person, absolute: true)
diff --git a/app/views/notifier/contacts_birthday.markerb b/app/views/notifier/contacts_birthday.markerb
deleted file mode 100644
index ee4d27770..000000000
--- a/app/views/notifier/contacts_birthday.markerb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<%= t(".birthday", name: @notification.person.name) %>
-
-[<%= t(".view_profile", name: @notification.person.name) %>][1]
-
-[1]: <%= local_or_remote_person_path(@notification.person, absolute: true) %>
diff --git a/app/views/notifier/contacts_birthday.text.erb b/app/views/notifier/contacts_birthday.text.erb
new file mode 100644
index 000000000..773fc41c1
--- /dev/null
+++ b/app/views/notifier/contacts_birthday.text.erb
@@ -0,0 +1,4 @@
+<%= t(".birthday", name: @notification.person.name) %>
+
+<%= t(".view_profile", name: @notification.person.first_name) %>
+<%= local_or_remote_person_path(@notification.person, absolute: true) %>
diff --git a/app/views/notifier/csrf_token_fail.html.haml b/app/views/notifier/csrf_token_fail.html.haml
new file mode 100644
index 000000000..08c27d4b9
--- /dev/null
+++ b/app/views/notifier/csrf_token_fail.html.haml
@@ -0,0 +1,4 @@
+- message = t("notifier.csrf_token_fail.body",
+ name: @notification.recipient_first_name,
+ link: "https://owasp.org/www-community/attacks/csrf")
+!= Redcarpet::Markdown.new(Diaspora::Markdownify::Email).render(message)
diff --git a/app/views/notifier/csrf_token_fail.markerb b/app/views/notifier/csrf_token_fail.markerb
deleted file mode 100644
index 22f3164ea..000000000
--- a/app/views/notifier/csrf_token_fail.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t("notifier.csrf_token_fail.body", name: @notification.recipient_first_name, link: "https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)") %>
diff --git a/app/views/notifier/csrf_token_fail.text.erb b/app/views/notifier/csrf_token_fail.text.erb
new file mode 100644
index 000000000..ef034ed02
--- /dev/null
+++ b/app/views/notifier/csrf_token_fail.text.erb
@@ -0,0 +1,3 @@
+<%= t("notifier.csrf_token_fail.body",
+ name: @notification.recipient_first_name,
+ link: "https://owasp.org/www-community/attacks/csrf") %>
diff --git a/app/views/notifier/invite.markerb b/app/views/notifier/invite.markerb
deleted file mode 100644
index 8c20a00c0..000000000
--- a/app/views/notifier/invite.markerb
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= t('.message',
- invite_url: invite_code_url(@invitation_code),
- diasporafoundation_url: 'https://diasporafoundation.org/',
- user: @inviter.try(:full_name).empty? ? @inviter.try(:diaspora_handle) : "#{@inviter.name} (#{@inviter.diaspora_handle})",
- diaspora_id: @inviter.try(:diaspora_handle))
-%>
diff --git a/app/views/notifier/liked.html.haml b/app/views/notifier/liked.html.haml
new file mode 100644
index 000000000..96cf3770f
--- /dev/null
+++ b/app/views/notifier/liked.html.haml
@@ -0,0 +1,10 @@
+- if @notification.like_target.public?
+ %p
+ #{t('.liked', name: @notification.sender_name)}:
+ = post_message(@notification.like_target, html: true)
+- else
+ %p
+ #{t('notifier.liked.limited_post', name: @notification.sender_name)}.
+
+%p
+ = link_to t(".view_post"), post_url(@notification.like_target)
diff --git a/app/views/notifier/liked.markerb b/app/views/notifier/liked.markerb
deleted file mode 100644
index 8ed88a979..000000000
--- a/app/views/notifier/liked.markerb
+++ /dev/null
@@ -1,11 +0,0 @@
-<% if @notification.like_target.public? %>
-<%= "#{t('.liked', :name => "#{@notification.sender_name}")}:" %>
-
-<%= post_message(@notification.like_target, :process_newlines => true) %>
-<% else %>
-<%= "#{t('notifier.liked.limited_post', :name => "#{@notification.sender_name}")}." %>
-<% end %>
-
-[<%= t('.view_post') %>][1]
-
-[1]: <%= post_url(@notification.like_target) %>
diff --git a/app/views/notifier/liked.text.erb b/app/views/notifier/liked.text.erb
new file mode 100644
index 000000000..ce743ade3
--- /dev/null
+++ b/app/views/notifier/liked.text.erb
@@ -0,0 +1,10 @@
+<% if @notification.like_target.public? %>
+<%= "#{t(".liked", name: @notification.sender_name)}:" %>
+
+<%= post_message(@notification.like_target) %>
+<% else %>
+<%= "#{t("notifier.liked.limited_post", name: @notification.sender_name)}." %>
+<% end %>
+
+<%= t(".view_post") %>
+<%= post_url(@notification.like_target) %>
diff --git a/app/views/notifier/mentioned.html.haml b/app/views/notifier/mentioned.html.haml
new file mode 100644
index 000000000..715de7647
--- /dev/null
+++ b/app/views/notifier/mentioned.html.haml
@@ -0,0 +1,9 @@
+- if @notification.post.public?
+ = post_message(@notification.post, html: true)
+- else
+ %p
+ = t("notifier.mentioned.limited_post")
+
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.post.author_first_name),
+ post_url(@notification.post)
diff --git a/app/views/notifier/mentioned.markerb b/app/views/notifier/mentioned.markerb
deleted file mode 100644
index 414739665..000000000
--- a/app/views/notifier/mentioned.markerb
+++ /dev/null
@@ -1,9 +0,0 @@
-<% if @notification.post.public? %>
-<%= post_message(@notification.post, :process_newlines => true) %>
-<% else %>
-<%= t('notifier.mentioned.limited_post') %>
-<% end %>
-
-[<%= t("notifier.comment_on_post.reply", name: @notification.post_author_name) %>][1]
-
-[1]: <%= post_url(@notification.post) %>
diff --git a/app/views/notifier/mentioned.text.erb b/app/views/notifier/mentioned.text.erb
new file mode 100644
index 000000000..fbce0dbb4
--- /dev/null
+++ b/app/views/notifier/mentioned.text.erb
@@ -0,0 +1,8 @@
+<% if @notification.post.public? %>
+<%= post_message(@notification.post) %>
+<% else %>
+<%= t("notifier.mentioned.limited_post") %>
+<% end %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.post.author_first_name) %>
+<%= post_url(@notification.post) %>
diff --git a/app/views/notifier/mentioned_in_comment.html.haml b/app/views/notifier/mentioned_in_comment.html.haml
new file mode 100644
index 000000000..89d04cb49
--- /dev/null
+++ b/app/views/notifier/mentioned_in_comment.html.haml
@@ -0,0 +1,9 @@
+- if @notification.comment.public?
+ = @notification.comment.message.markdownified_for_mail
+- else
+ %p
+ = t("notifier.mentioned_in_comment.limited_post")
+
+%p
+ = link_to t("notifier.mentioned_in_comment.reply"),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/mentioned_in_comment.markerb b/app/views/notifier/mentioned_in_comment.text.erb
index 3b86f409b..8f327a2a6 100644
--- a/app/views/notifier/mentioned_in_comment.markerb
+++ b/app/views/notifier/mentioned_in_comment.text.erb
@@ -4,6 +4,5 @@
<%= t("notifier.mentioned_in_comment.limited_post") %>
<% end %>
-[<%= t("notifier.mentioned_in_comment.reply") %>][1]
-
-[1]: <%= post_url(@notification.comment.parent, anchor: @notification.comment.guid) %>
+<%= t("notifier.mentioned_in_comment.reply") %>
+<%= post_url(@notification.comment.parent, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/plain_markdown_email.html.haml b/app/views/notifier/plain_markdown_email.html.haml
new file mode 100644
index 000000000..a102d4ecb
--- /dev/null
+++ b/app/views/notifier/plain_markdown_email.html.haml
@@ -0,0 +1,2 @@
+%div{style: "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px"}
+ != Redcarpet::Markdown.new(Diaspora::Markdownify::Email).render(body)
diff --git a/app/views/notifier/plain_markdown_email.text.haml b/app/views/notifier/plain_markdown_email.text.haml
new file mode 100644
index 000000000..d2059e444
--- /dev/null
+++ b/app/views/notifier/plain_markdown_email.text.haml
@@ -0,0 +1 @@
+!= body
diff --git a/app/views/notifier/private_message.html.haml b/app/views/notifier/private_message.html.haml
new file mode 100644
index 000000000..bd4eb72f0
--- /dev/null
+++ b/app/views/notifier/private_message.html.haml
@@ -0,0 +1,4 @@
+%p
+ = t("notifier.a_private_message")
+%p
+ = link_to t(".reply_to_or_view"), conversations_url(conversation_id: @notification.conversation)
diff --git a/app/views/notifier/private_message.markerb b/app/views/notifier/private_message.markerb
deleted file mode 100644
index e41a38cb4..000000000
--- a/app/views/notifier/private_message.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t('notifier.a_private_message') %>
-
-[<%= t('.reply_to_or_view') %>][1]
-
-[1]: <%= conversations_url(:conversation_id => @notification.conversation) %>
diff --git a/app/views/notifier/private_message.text.erb b/app/views/notifier/private_message.text.erb
new file mode 100644
index 000000000..6751ea454
--- /dev/null
+++ b/app/views/notifier/private_message.text.erb
@@ -0,0 +1,4 @@
+<%= t("notifier.a_private_message") %>
+
+<%= t(".reply_to_or_view") %>
+<%= conversations_url(conversation_id: @notification.conversation) %>
diff --git a/app/views/notifier/reshared.html.haml b/app/views/notifier/reshared.html.haml
new file mode 100644
index 000000000..1450775e9
--- /dev/null
+++ b/app/views/notifier/reshared.html.haml
@@ -0,0 +1,5 @@
+%p
+ #{t('.reshared', name: @notification.sender_name)}:
+= post_message(@notification.reshare_root, html: true)
+%p
+ = link_to t(".view_post"), post_url(@notification.reshare)
diff --git a/app/views/notifier/reshared.markerb b/app/views/notifier/reshared.markerb
deleted file mode 100644
index a1c43c6a1..000000000
--- a/app/views/notifier/reshared.markerb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= "#{t('.reshared', :name => "#{@notification.sender_name}")}:" %>
-
-<%= post_message(@notification.reshare_root, :process_newlines => true) %>
-
-[<%= t('.view_post') %>][1]
-
-[1]: <%= post_url(@notification.reshare) %>
diff --git a/app/views/notifier/reshared.text.erb b/app/views/notifier/reshared.text.erb
new file mode 100644
index 000000000..320b626b6
--- /dev/null
+++ b/app/views/notifier/reshared.text.erb
@@ -0,0 +1,6 @@
+<%= "#{t(".reshared", name: @notification.sender_name)}:" %>
+
+<%= post_message(@notification.reshare_root) %>
+
+<%= t(".view_post") %>
+<%= post_url(@notification.reshare) %>
diff --git a/app/views/notifier/single_admin.html.haml b/app/views/notifier/single_admin.html.haml
new file mode 100644
index 000000000..304e2fb92
--- /dev/null
+++ b/app/views/notifier/single_admin.html.haml
@@ -0,0 +1,8 @@
+%p
+ = t("notifier.hello", name: @receiver.username)
+%p
+ = @string
+%p
+ = t("notifier.thanks")
+ %br/
+ = t("notifier.single_admin.admin")
diff --git a/app/views/notifier/single_admin.markerb b/app/views/notifier/single_admin.markerb
deleted file mode 100644
index 0b9f23749..000000000
--- a/app/views/notifier/single_admin.markerb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t('notifier.hello', :name => @receiver.username) %>
-
-<%= @string %>
-
-<%= t('notifier.thanks') %>
-
-<%= t('notifier.single_admin.admin') %>
diff --git a/app/views/notifier/single_admin.text.erb b/app/views/notifier/single_admin.text.erb
new file mode 100644
index 000000000..ed2c0a4e4
--- /dev/null
+++ b/app/views/notifier/single_admin.text.erb
@@ -0,0 +1,6 @@
+<%= t("notifier.hello", name: @receiver.username) %>
+
+<%= @string %>
+
+<%= t("notifier.thanks") %>
+<%= t("notifier.single_admin.admin") %>
diff --git a/app/views/notifier/started_sharing.html.haml b/app/views/notifier/started_sharing.html.haml
new file mode 100644
index 000000000..bb5084ba7
--- /dev/null
+++ b/app/views/notifier/started_sharing.html.haml
@@ -0,0 +1,7 @@
+%p
+ = @notification.sender_name
+ = t(".sharing")
+
+%p
+ = link_to t(".view_profile", name: @notification.sender_first_name),
+ local_or_remote_person_path(@notification.sender, absolute: true)
diff --git a/app/views/notifier/started_sharing.markerb b/app/views/notifier/started_sharing.markerb
deleted file mode 100644
index d5e16d74c..000000000
--- a/app/views/notifier/started_sharing.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= @notification.sender_name %> <%= t('.sharing') %>
-
-[<%= t('.view_profile', :name => @notification.sender_first_name) %>][1]
-
-[1]: <%= local_or_remote_person_path(@notification.sender, :absolute => true) %>
diff --git a/app/views/notifier/started_sharing.text.erb b/app/views/notifier/started_sharing.text.erb
new file mode 100644
index 000000000..6218f8d9e
--- /dev/null
+++ b/app/views/notifier/started_sharing.text.erb
@@ -0,0 +1,4 @@
+<%= @notification.sender_name %> <%= t(".sharing") %>
+
+<%= t(".view_profile", name: @notification.sender_first_name) %>
+<%= local_or_remote_person_path(@notification.sender, absolute: true) %>
diff --git a/app/views/report/report_email.markerb b/app/views/report/report_email.markerb
deleted file mode 100644
index 2729aa96b..000000000
--- a/app/views/report/report_email.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t("notifier.report_email.body",
- url: resource[:url],
- type: resource[:type],
- id: resource[:id],
- reason: resource[:reason]) %>
diff --git a/app/views/users/export_email.markerb b/app/views/users/export_email.markerb
deleted file mode 100644
index c345ae67a..000000000
--- a/app/views/users/export_email.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t('notifier.export_email.body', url: download_profile_user_url, name: @user.first_name) %>
diff --git a/app/views/users/export_failure_email.markerb b/app/views/users/export_failure_email.markerb
deleted file mode 100644
index 33da52efb..000000000
--- a/app/views/users/export_failure_email.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t('notifier.export_failure_email.body', name: @user.first_name) %>
diff --git a/app/views/users/export_photos_email.markerb b/app/views/users/export_photos_email.markerb
deleted file mode 100644
index 24bc4fd1d..000000000
--- a/app/views/users/export_photos_email.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t('notifier.export_photos_email.body', url: download_photos_user_url, name: @user.first_name) %>
diff --git a/app/views/users/export_photos_failure_email.markerb b/app/views/users/export_photos_failure_email.markerb
deleted file mode 100644
index 2067327c9..000000000
--- a/app/views/users/export_photos_failure_email.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t('notifier.export_photos_failure_email.body', name: @user.first_name) %>
diff --git a/app/workers/export_photos.rb b/app/workers/export_photos.rb
index 2fe4c007f..cf62cd144 100644
--- a/app/workers/export_photos.rb
+++ b/app/workers/export_photos.rb
@@ -4,7 +4,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
-
module Workers
class ExportPhotos < Base
sidekiq_options queue: :low
@@ -14,9 +13,9 @@ module Workers
@user.perform_export_photos!
if @user.reload.exported_photos_file.present?
- ExportMailer.export_photos_complete_for(@user)
+ ExportMailer.export_photos_complete_for(@user).deliver_now
else
- ExportMailer.export_photos_failure_for(@user)
+ ExportMailer.export_photos_failure_for(@user).deliver_now
end
end
end
diff --git a/config/initializers/entypo.rb b/config/initializers/entypo.rb
deleted file mode 100644
index 1a0fa5221..000000000
--- a/config/initializers/entypo.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-Entypo.css_prefix = "entypo"
diff --git a/config/initializers/markerb.rb b/config/initializers/markerb.rb
deleted file mode 100644
index a39d0cbee..000000000
--- a/config/initializers/markerb.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-Rails.application.config.markerb.renderer = Diaspora::Markdownify::Email
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 60048ae5d..f79db200e 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -741,7 +741,7 @@ en:
started_sharing:
subject: "%{name} started sharing with you on diaspora*"
sharing: "has started sharing with you!"
- view_profile: "View %{name}’s profile"
+ view_profile: "View %{name}’s profile >"
comment_on_post:
limited_subject: "There's a new comment on one of your posts"
reply: "Reply or view %{name}’s post >"
@@ -766,7 +766,7 @@ en:
contacts_birthday:
subject: "%{name} has their birthday today"
birthday: "%{name} has their birthday today. Wish them 'Happy Birthday'!"
- view_profile: "View %{name}’s profile"
+ view_profile: "View %{name}’s profile >"
confirm_email:
subject: "Please activate your new email address %{unconfirmed_email}"
click_link: "To activate your new email address %{unconfirmed_email}, please follow this link:"
diff --git a/lib/diaspora/mentionable.rb b/lib/diaspora/mentionable.rb
index fe6396a9d..39dc7b085 100644
--- a/lib/diaspora/mentionable.rb
+++ b/lib/diaspora/mentionable.rb
@@ -1,4 +1,3 @@
-
# frozen_string_literal: true
module Diaspora::Mentionable
@@ -55,8 +54,9 @@ module Diaspora::Mentionable
#
# @param [String] message text
# @param [Array] allowed_people ids of people that are allowed to stay
+ # @param [Boolean] absolute_links (false) render mentions with absolute links
# @return [String] message text with filtered mentions
- def self.filter_people(msg_text, allowed_people)
+ def self.filter_people(msg_text, allowed_people, absolute_links: false)
mentioned_ppl = people_from_string(msg_text)
msg_text.to_s.gsub(REGEX) {|match_str|
@@ -66,7 +66,7 @@ module Diaspora::Mentionable
if person && allowed_people.include?(person.id)
match_str
else
- "@#{MentionsInternal.profile_link(person, name, diaspora_id)}"
+ "@#{MentionsInternal.profile_link(person, name, diaspora_id, absolute: absolute_links)}"
end
}
end
@@ -79,7 +79,7 @@ module Diaspora::Mentionable
# inline module for namespacing
module MentionsInternal
- extend ::PeopleHelper
+ extend ERB::Util
# output a formatted mention link as defined by the given arguments.
# if the display name is blank, falls back to the person's name.
@@ -91,10 +91,15 @@ module Diaspora::Mentionable
def self.mention_link(person, display_name, diaspora_id, opts)
return display_name || diaspora_id unless person.present?
+ display_name ||= person.name
if opts[:plain_text]
- display_name || person.name
+ display_name
else
- person_link(person, class: PERSON_HREF_CLASS, display_name: display_name)
+ # rubocop:disable Rails/OutputSafety
+ remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
+ "<a data-hovercard=\"#{remote_or_hovercard_link}\" href=\"#{remote_or_hovercard_link}\" " \
+ "class=\"#{PERSON_HREF_CLASS}\">#{html_escape_once(display_name)}</a>".html_safe
+ # rubocop:enable Rails/OutputSafety
end
end
@@ -103,11 +108,14 @@ module Diaspora::Mentionable
#
# @param [Person] AR Person
# @param [String] display name
+ # @param [String] diaspora_id
+ # @param [Boolean] absolute (false) render absolute link
# @return [String] markdown person link
- def self.profile_link(person, display_name, diaspora_id)
+ def self.profile_link(person, display_name, diaspora_id, absolute: false)
return display_name || diaspora_id unless person.present?
- "[#{display_name || person.name}](#{local_or_remote_person_path(person)})"
+ url_helper = Rails.application.routes.url_helpers
+ "[#{display_name || person.name}](#{absolute ? url_helper.person_url(person) : url_helper.person_path(person)})"
end
end
end
diff --git a/lib/diaspora/message_renderer.rb b/lib/diaspora/message_renderer.rb
index 4f12c85f8..7cb0df3fd 100644
--- a/lib/diaspora/message_renderer.rb
+++ b/lib/diaspora/message_renderer.rb
@@ -56,8 +56,8 @@ module Diaspora
@message = renderer.render(message).strip
end
- def markdownify
- renderer = Diaspora::Markdownify::HTML.new options[:markdown_render_options]
+ def markdownify(renderer_class=Diaspora::Markdownify::HTML)
+ renderer = renderer_class.new options[:markdown_render_options]
markdown = Redcarpet::Markdown.new renderer, options[:markdown_options]
@message = markdown.render message
@@ -76,8 +76,8 @@ module Diaspora
@message = Diaspora::Mentionable.format message, options[:mentioned_people]
end
- if options[:disable_hovercards] || options[:link_all_mentions]
- @message = Diaspora::Mentionable.filter_people message, []
+ if options[:disable_hovercards]
+ @message = Diaspora::Mentionable.filter_people(message, [], absolute_links: true)
else
make_mentions_plain_text
end
@@ -108,7 +108,6 @@ module Diaspora
end
DEFAULTS = {mentioned_people: [],
- link_all_mentions: false,
disable_hovercards: false,
truncate: false,
append: nil,
@@ -137,12 +136,8 @@ module Diaspora
# @param [Hash] opts Global options affecting output
# @option opts [Array<Person>] :mentioned_people ([]) List of people
# allowed to mention
- # @option opts [Boolean] :link_all_mentions (false) Whether to link
- # all mentions. This makes plain links to profiles for people not in
- # :mentioned_people
# @option opts [Boolean] :disable_hovercards (true) Render all mentions
- # as profile links. This implies :link_all_mentions and ignores
- # :mentioned_people
+ # as absolute profile links. This ignores :mentioned_people
# @option opts [#to_i, Boolean] :truncate (false) Truncate message to
# the specified length
# @option opts [String] :append (nil) Append text to the end of
@@ -205,7 +200,7 @@ module Diaspora
render_tags
squish
append_and_truncate
- }.html_safe
+ }.html_safe # rubocop:disable Rails/OutputSafety
end
# @param [Hash] opts Override global output options, see {#initialize}
@@ -220,7 +215,20 @@ module Diaspora
render_tags
squish
append_and_truncate
- }.html_safe
+ }.html_safe # rubocop:disable Rails/OutputSafety
+ end
+
+ def markdownified_for_mail
+ process(disable_hovercards: true) {
+ process_newlines
+ normalize
+ diaspora_links
+ camo_urls if AppConfig.privacy.camo.proxy_markdown_images?
+ render_mentions
+ markdownify(Diaspora::Markdownify::Email)
+ squish
+ append_and_truncate
+ }.html_safe # rubocop:disable Rails/OutputSafety
end
# Get a short summary of the message
diff --git a/spec/helpers/notifier_helper_spec.rb b/spec/helpers/notifier_helper_spec.rb
index c4d5a4c6e..77eb2a1dc 100644
--- a/spec/helpers/notifier_helper_spec.rb
+++ b/spec/helpers/notifier_helper_spec.rb
@@ -5,18 +5,23 @@
# the COPYRIGHT file.
describe NotifierHelper, :type => :helper do
- describe '#post_message' do
+ describe "#post_message" do
before do
# post for markdown test
@markdown_post = FactoryBot.create(:status_message,
- text: "[link](http://diasporafoundation.org) **bold text** *other text*", public: true)
- @striped_markdown_post = "link (http://diasporafoundation.org) bold text other text"
+ text: "[link](https://diasporafoundation.org) **bold text** *other text*",
+ public: true)
+ @striped_markdown_post = "link (https://diasporafoundation.org) bold text other text"
end
- it 'strip markdown in the post' do
+ it "strip markdown in the post" do
expect(post_message(@markdown_post)).to eq(@striped_markdown_post)
end
+ it "renders markdown as html" do
+ expect(post_message(@markdown_post, html: true)).to include("<a href=\"https://diasporafoundation.org\">link</a>")
+ end
+
it "falls back to the title if the post has no text" do
photo = FactoryBot.build(:photo, public: true)
photo_post = FactoryBot.build(:status_message, author: photo.author, text: "", photos: [photo], public: true)
@@ -32,13 +37,13 @@ describe NotifierHelper, :type => :helper do
end
end
- describe '#comment_message' do
+ describe "#comment_message" do
before do
# comment for markdown test
@markdown_comment = FactoryBot.create(:comment)
@markdown_comment.post.public = true
- @markdown_comment.text = "[link](http://diasporafoundation.org) **bold text** *other text*"
- @striped_markdown_comment = "link (http://diasporafoundation.org) bold text other text"
+ @markdown_comment.text = "[link](https://diasporafoundation.org) **bold text** *other text*"
+ @striped_markdown_comment = "link (https://diasporafoundation.org) bold text other text"
# comment for limited post
@limited_comment = FactoryBot.create(:comment)
@@ -46,11 +51,16 @@ describe NotifierHelper, :type => :helper do
@limited_comment.text = "This is top secret comment. Shhhhhhhh!!!"
end
- it 'strip markdown in the comment' do
+ it "strip markdown in the comment" do
expect(comment_message(@markdown_comment)).to eq(@striped_markdown_comment)
end
- it 'hides the private content' do
+ it "renders markdown as html" do
+ expect(comment_message(@markdown_comment, html: true))
+ .to include("<a href=\"https://diasporafoundation.org\">link</a>")
+ end
+
+ it "hides the private content" do
expect(comment_message(@limited_comment)).not_to include("secret comment")
end
end
diff --git a/spec/helpers/people_helper_spec.rb b/spec/helpers/people_helper_spec.rb
index 12ab56230..7c36e176c 100644
--- a/spec/helpers/people_helper_spec.rb
+++ b/spec/helpers/people_helper_spec.rb
@@ -75,7 +75,7 @@ describe PeopleHelper, :type => :helper do
end
it 'links by id for a local user' do
- expect(person_link(@user.person)).to include "href='#{person_path(@user.person)}'"
+ expect(person_link(@user.person)).to include "href=\"#{person_path(@user.person)}\""
end
it "recognizes the 'display_name' option" do
diff --git a/spec/lib/diaspora/mentionable_spec.rb b/spec/lib/diaspora/mentionable_spec.rb
index 63a065ed5..174bb8de3 100644
--- a/spec/lib/diaspora/mentionable_spec.rb
+++ b/spec/lib/diaspora/mentionable_spec.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true
describe Diaspora::Mentionable do
- include PeopleHelper
-
let(:people) { [alice, bob, eve].map(&:person) }
let(:names) { %w(Alice\ A Bob\ B "Eve>\ E) }
@@ -41,7 +39,9 @@ STR
end
describe ".format" do
- context "html output" do
+ context "html output", type: :helper do
+ include PeopleHelper
+
it "adds the links to the formatted message" do
fmt_msg = Diaspora::Mentionable.format(test_text_with_names, people)
@@ -75,7 +75,7 @@ STR
fmt_msg = Diaspora::Mentionable.format(test_txt, people)
expect(fmt_msg).not_to include(name)
- expect(fmt_msg).to include("&gt;", "&lt;", "&#39;") # ">", "<", "'"
+ expect(fmt_msg).to include("&lt;/a&gt;&lt;script&gt;alert(&#39;h&#39;)&lt;/script&gt;")
end
end
@@ -184,7 +184,7 @@ STR
user_a.aspects.where(name: "generic").first.contacts.map(&:person_id)
)
- expect(txt).to include("@[user C](#{local_or_remote_person_path(user_c.person)}")
+ expect(txt).to include("@[user C](#{Rails.application.routes.url_helpers.person_path(user_c.person)}")
expect(txt).not_to include("href")
expect(txt).not_to include(mention)
end
diff --git a/spec/lib/diaspora/message_renderer_spec.rb b/spec/lib/diaspora/message_renderer_spec.rb
index 9f2cea726..a9a12e85b 100644
--- a/spec/lib/diaspora/message_renderer_spec.rb
+++ b/spec/lib/diaspora/message_renderer_spec.rb
@@ -78,12 +78,6 @@ describe Diaspora::MessageRenderer do
end
context 'linking all mentions' do
- it 'makes plain links for people not in the post aspects' do
- message = message("@{Bob; #{bob.person.diaspora_handle}}", link_all_mentions: true).html
- expect(message).to_not include 'hovercard'
- expect(message).to include '/u/bob'
- end
-
it "makes no hovercards if they're disabled" do
message = message(
"@{Bob; #{bob.person.diaspora_handle}}",
@@ -91,7 +85,7 @@ describe Diaspora::MessageRenderer do
disable_hovercards: true
).html
expect(message).to_not include 'hovercard'
- expect(message).to include '/u/bob'
+ expect(message).to include AppConfig.url_to("/people/#{bob.person.guid}")
end
end
end
diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb
index 542a75275..0f4a13f7b 100644
--- a/spec/mailers/notifier_spec.rb
+++ b/spec/mailers/notifier_spec.rb
@@ -121,10 +121,6 @@ describe Notifier, type: :mailer do
it "has the post text in the body" do
expect(@mail.body.encoded).to include(@post.text)
end
-
- it "should not include translation fallback" do
- expect(@mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
describe ".mentioned_in_comment" do
@@ -180,10 +176,6 @@ describe Notifier, type: :mailer do
it "has the post text not in the body" do
expect(@mail.body.encoded).not_to include(@post.text)
end
-
- it "should not include translation fallback" do
- expect(@mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
describe ".liked" do
@@ -205,10 +197,6 @@ describe Notifier, type: :mailer do
expect(@mail.body.encoded).to include(@like.author.name)
end
- it "should not include translation fallback" do
- expect(@mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
-
it "can handle a reshare" do
reshare = FactoryBot.create(:reshare)
like = reshare.likes.create!(author: bob.person)
@@ -247,10 +235,6 @@ describe Notifier, type: :mailer do
it "BODY: contains the name of person liking" do
expect(@mail.body.encoded).to include(@reshare.author.name)
end
-
- it "should not include translation fallback" do
- expect(@mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
describe ".private_message" do
@@ -294,10 +278,6 @@ describe Notifier, type: :mailer do
it "BODY: does not contain the message text" do
expect(@mail.body.encoded).not_to include(@cnv.messages.first.text)
end
-
- it "should not include translation fallback" do
- expect(@mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
context "comments" do
@@ -334,10 +314,6 @@ describe Notifier, type: :mailer do
it "contains the original post's link with comment anchor" do
expect(comment_mail.body.encoded).to include("#{comment.post.id}##{comment.guid}")
end
-
- it "should not include translation fallback" do
- expect(comment_mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
[:reshare].each do |post_type|
@@ -380,10 +356,6 @@ describe Notifier, type: :mailer do
it "contains the original post's link with comment anchor" do
expect(comment_mail.body.encoded).to include("#{comment.post.id}##{comment.guid}")
end
-
- it "should not include translation fallback" do
- expect(comment_mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
[:reshare].each do |post_type|
context post_type.to_s do
@@ -490,10 +462,6 @@ describe Notifier, type: :mailer do
it "BODY: contains the name of person liking" do
expect(mail.body.encoded).to include(bob.name)
end
-
- it "should not include translation fallback" do
- expect(mail.body.encoded).not_to include(I18n.translate "notifier.a_post_you_shared")
- end
end
end
@@ -580,16 +548,16 @@ describe Notifier, type: :mailer do
it "has some informative text in the body" do
email.body.parts.each do |part|
- expect(part.decoded).to include("https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)")
+ expect(part.decoded).to include("https://owasp.org/www-community/attacks/csrf")
end
end
end
describe "hashtags" do
it "escapes hashtags" do
- mails = Notifier.admin("#Welcome to bureaucracy!", [bob])
- expect(mails.length).to eq(1)
- mail = mails.first
+ status = FactoryBot.create(:status_message, author: alice.person, text: "#Welcome to bureaucracy!", public: true)
+ like = status.likes.create!(author: bob.person)
+ mail = Notifier.send_notification("liked", alice.id, like.author.id, like.id)
expect(mail.body.encoded).to match(
"<p><a href=\"#{AppConfig.url_to(tag_path('welcome'))}\">#Welcome</a> to bureaucracy!</p>"
)
diff --git a/spec/workers/reset_password_spec.rb b/spec/workers/reset_password_spec.rb
index 6d1b7ca72..59c5cca79 100644
--- a/spec/workers/reset_password_spec.rb
+++ b/spec/workers/reset_password_spec.rb
@@ -12,8 +12,8 @@ describe Workers::ResetPassword do
Workers::ResetPassword.new.perform(alice.id)
mail = Devise.mailer.deliveries.last
expect(mail.to).to eq([alice.email])
- expect(mail.body).to include("change your password")
- expect(mail.body).to include(alice.username)
+ expect(mail.body.encoded).to include("change your password")
+ expect(mail.body.encoded).to include(alice.username)
end
end
end
diff --git a/vendor/assets/entypo/LICENSE_ENTYPO b/vendor/assets/entypo/LICENSE_ENTYPO
new file mode 100644
index 000000000..bf6eca68e
--- /dev/null
+++ b/vendor/assets/entypo/LICENSE_ENTYPO
@@ -0,0 +1,95 @@
+Copyright (c) Daniel Bruce (<http://www.entypo.com/>),
+with Reserved Font Name <Entypo> and <Entypo Social>.
+
+This Font Software located at app/assets/fonts is licensed under the
+SIL Open Font License, Version 1.1. This license is copied below, and
+is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/vendor/assets/entypo/entypo.scss b/vendor/assets/entypo/entypo.scss
new file mode 100644
index 000000000..22068e893
--- /dev/null
+++ b/vendor/assets/entypo/entypo.scss
@@ -0,0 +1,311 @@
+@charset "UTF-8";
+
+@font-face {
+ font-family: 'entypo';
+ src: asset-url('entypo.woff') format('woff');
+ font-weight: normal; font-style: normal;
+}
+
+[class^="entypo-"], [class*=" entypo-"] {
+ font-family: entypo;
+ font-style: normal;
+ font-weight: normal;
+ display: inline-block;
+ width: 1.1em;
+ margin-right: .1em;
+ text-align: center;
+ -webkit-font-smoothing: antialiased;
+}
+
+/* main icon map */
+.entypo-phone:before { content: '\1f4de'; } /* 1f4de */
+.entypo-mobile:before { content: '\1f4f1'; } /* 1f4f1 */
+.entypo-mouse:before { content: '\e789'; } /* e789 */
+.entypo-address:before { content: '\e723'; } /* e723 */
+.entypo-mail:before { content: '\2709'; } /* 2709 */
+.entypo-paper-plane:before { content: '\e79b'; } /* e79b */
+.entypo-pencil:before { content: '\270e'; } /* 270e */
+.entypo-feather:before { content: '\2712'; } /* 2712 */
+.entypo-attach:before { content: '\1f4ce'; } /* 1f4ce */
+.entypo-inbox:before { content: '\e777'; } /* e777 */
+.entypo-reply:before { content: '\e712'; } /* e712 */
+.entypo-reply-all:before { content: '\e713'; } /* e713 */
+.entypo-forward:before { content: '\27a6'; } /* 27a6 */
+.entypo-user:before { content: '\1f464'; } /* 1f464 */
+.entypo-users:before { content: '\1f465'; } /* 1f465 */
+.entypo-add-user:before { content: '\e700'; } /* e700 */
+.entypo-vcard:before { content: '\e722'; } /* e722 */
+.entypo-export:before { content: '\e715'; } /* e715 */
+.entypo-location:before { content: '\e724'; } /* e724 */
+.entypo-map:before { content: '\e727'; } /* e727 */
+.entypo-compass:before { content: '\e728'; } /* e728 */
+.entypo-direction:before { content: '\27a2'; } /* 27a2 */
+.entypo-share:before { content: '\e73c'; } /* e73c */
+.entypo-shareable:before { content: '\e73e'; } /* e73e */
+.entypo-heart:before { content: '\2665'; } /* 2665 */
+.entypo-heart-empty:before { content: '\2661'; } /* 2661 */
+.entypo-star:before { content: '\2605'; } /* 2605 */
+.entypo-star-empty:before { content: '\2606'; } /* 2606 */
+.entypo-thumbs-up:before { content: '\1f44d'; } /* 1f44d */
+.entypo-thumbs-down:before { content: '\1f44e'; } /* 1f44e */
+.entypo-chat:before { content: '\e720'; } /* e720 */
+.entypo-comment:before { content: '\e718'; } /* e718 */
+.entypo-quote:before { content: '\275e'; } /* 275e */
+.entypo-home:before { content: '\2302'; } /* 2302 */
+.entypo-popup:before { content: '\e74c'; } /* e74c */
+.entypo-search:before { content: '\1f50d'; } /* 1f50d */
+.entypo-flashlight:before { content: '\1f526'; } /* 1f526 */
+.entypo-print:before { content: '\e716'; } /* e716 */
+.entypo-bell:before { content: '\1f514'; } /* 1f514 */
+.entypo-link:before { content: '\1f517'; } /* 1f517 */
+.entypo-flag:before { content: '\2691'; } /* 2691 */
+.entypo-cog:before { content: '\2699'; } /* 2699 */
+.entypo-tools:before { content: '\2692'; } /* 2692 */
+.entypo-trophy:before { content: '\1f3c6'; } /* 1f3c6 */
+.entypo-tag:before { content: '\e70c'; } /* e70c */
+.entypo-camera:before { content: '\1f4f7'; } /* 1f4f7 */
+.entypo-megaphone:before { content: '\1f4e3'; } /* 1f4e3 */
+.entypo-moon:before { content: '\263d'; } /* 263d */
+.entypo-palette:before { content: '\1f3a8'; } /* 1f3a8 */
+.entypo-leaf:before { content: '\1f342 '; } /* 1f342 */
+.entypo-note:before { content: '\266a'; } /* 266a */
+.entypo-beamed-note:before { content: '\266b'; } /* 266b */
+.entypo-graduation-cap:before { content: '\1f393 '; } /* 1f393 */
+.entypo-book:before { content: '\1f4d5 '; } /* 1f4d5 */
+.entypo-newspaper:before { content: '\1f4f0'; } /* 1f4f0 */
+.entypo-bag:before { content: '\1f45c'; } /* 1f45c */
+.entypo-lifebuoy:before { content: '\e788'; } /* e788 */
+.entypo-eye:before { content: '\e70a'; } /* e70a */
+.entypo-clock:before { content: '\1f554'; } /* 1f554 */
+.entypo-mic:before { content: '\1f3a4'; } /* 1f3a4 */
+.entypo-calendar:before { content: '\1f4c5'; } /* 1f4c5 */
+.entypo-flash:before { content: '\26a1'; } /* 26a1 */
+.entypo-thunder-cloud:before { content: '\26c8'; } /* 26c8 */
+.entypo-droplet:before { content: '\1f4a7'; } /* 1f4a7 */
+.entypo-cd:before { content: '\1f4bf'; } /* 1f4bf */
+.entypo-briefcase:before { content: '\1f4bc'; } /* 1f4bc */
+.entypo-air:before { content: '\e753'; } /* e753 */
+.entypo-hourglass:before { content: '\23f3'; } /* 23f3 */
+.entypo-gauge:before { content: '\e7a2'; } /* e7a2 */
+.entypo-language:before { content: '\e752'; } /* e752 */
+.entypo-network:before { content: '\e776'; } /* e776 */
+.entypo-key:before { content: '\1f511'; } /* 1f511 */
+.entypo-battery:before { content: '\1f50b'; } /* 1f50b */
+.entypo-bucket:before { content: '\e756'; } /* e756 */
+.entypo-magnet:before { content: '\e7a1'; } /* e7a1 */
+.entypo-drive:before { content: '\e755'; } /* e755 */
+.entypo-cup:before { content: '\2615'; } /* 2615 */
+.entypo-rocket:before { content: '\1f680'; } /* 1f680 */
+.entypo-brush:before { content: '\e79a'; } /* e79a */
+.entypo-suitcase:before { content: '\e78e'; } /* e78e */
+.entypo-traffic-cone:before { content: '\e7a3'; } /* e7a3 */
+.entypo-globe:before { content: '\1f30e'; } /* 1f30e */
+.entypo-keyboard:before { content: '\2328'; } /* 2328 */
+.entypo-publish:before { content: '\e74d'; } /* e74d */
+.entypo-progress-3:before { content: '\e76b'; } /* e76b */
+.entypo-progress-2:before { content: '\e76a'; } /* e76a */
+.entypo-progress-1:before { content: '\e769'; } /* e769 */
+.entypo-progress-0:before { content: '\e768'; } /* e768 */
+.entypo-light-down:before { content: '\1f505'; } /* 1f505' */
+.entypo-light-up:before { content: '\1f506'; } /* 1f506 */
+.entypo-adjust:before { content: '\25d1'; } /* 25d1 */
+.entypo-code:before { content: '\e714'; } /* e714 */
+.entypo-monitor:before { content: '\1f4bb'; } /* 1f4bb */
+.entypo-infinity:before { content: '\221e'; } /* 221e */
+.entypo-credit-card:before { content: '\1f4b3'; } /* 1f4b3 */
+.entypo-database:before { content: '\e754'; } /* e754 */
+.entypo-clipboard:before { content: '\1f4cb'; } /* 1f4cb */
+.entypo-box:before { content: '\1f4e6'; } /* 1f4e6 */
+.entypo-ticket:before { content: '\1f3ab'; } /* 1f3ab */
+.entypo-rss:before { content: '\e73a'; } /* e73a */
+.entypo-signal:before { content: '\1f4f6'; } /* 1f4f6 */
+.entypo-thermometer:before { content: '\e757'; } /* e757 */
+.entypo-water:before { content: '\1f4a6'; } /* 1f4a6 */
+.entypo-sweden:before { content: '\f601'; } /* f601 */
+.entypo-lock:before { content: '\1f512'; } /* 1f512 */
+.entypo-lock-open:before { content: '\1f513'; } /* 1f513 */
+.entypo-logout:before { content: '\e741'; } /* e741 */
+.entypo-login:before { content: '\e740'; } /* e740 */
+.entypo-check:before { content: '\2713'; } /* 2713 */
+.entypo-squared-plus:before { content: '\229e'; } /* 229e */
+.entypo-squared-minus:before { content: '\229f'; } /* 229f */
+.entypo-circled-plus:before { content: '\2795'; } /* 2795 */
+.entypo-circled-minus:before { content: '\2796'; } /* 2796 */
+.entypo-plus:before { content: '\2b'; } /* 2b */
+.entypo-minus:before { content: '\2d'; } /* 2d */
+.entypo-erase:before { content: '\232b'; } /* 232b */
+.entypo-block:before { content: '\1f6ab'; } /* 1f6ab */
+.entypo-info:before { content: '\2139'; } /* 2139 */
+.entypo-circled-info:before { content: '\e705'; } /* e705 */
+.entypo-help:before { content: '\2753'; } /* 2753 */
+.entypo-circled-help:before { content: '\e704'; } /* e704 */
+.entypo-ccw:before { content: '\27f2'; } /* 27f2 */
+.entypo-cw:before { content: '\27f3'; } /* 27f3 */
+.entypo-shuffle:before { content: '\1f500'; } /* 1f500 */
+.entypo-back:before { content: '\1f519'; } /* 1f519 */
+.entypo-level-up:before { content: '\21b0'; } /* 21b0 */
+.entypo-level-down:before { content: '\21b3'; } /* 21b3 */
+.entypo-retweet:before { content: '\e717'; } /* e717 */
+.entypo-reshare:before { content: '\e717'; } /* e717 */
+.entypo-loop:before { content: '\1f501'; } /* 1f501 */
+.entypo-back-in-time:before { content: '\e771'; } /* e771 */
+.entypo-switch:before { content: '\21c6'; } /* 21c6 */
+.entypo-layout:before { content: '\268f'; } /* 268f */
+.entypo-list:before { content: '\2630'; } /* 2630 */
+.entypo-doc:before { content: '\e730'; } /* e730 */
+.entypo-docs:before { content: '\e736'; } /* e736 */
+.entypo-text-doc-inverted:before { content: '\e731'; } /* e731 */
+.entypo-landscape-doc:before { content: '\e737'; } /* e737 */
+.entypo-picture:before { content: '\1f304'; } /* 1f304 */
+.entypo-video:before { content: '\1f3ac'; } /* 1f3ac */
+.entypo-music:before { content: '\1f3b5'; } /* 1f3b5 */
+.entypo-folder:before { content: '\1f4c1 '; } /* 1f4c1 */
+.entypo-archive:before { content: '\e738'; } /* e738 */
+.entypo-trash:before { content: '\e729'; } /* e729 */
+.entypo-upload:before { content: '\1f4e4'; } /* 1f4e4 */
+.entypo-download:before { content: '\1f4e5'; } /* 1f4e5 */
+.entypo-install:before { content: '\e778'; } /* e778 */
+.entypo-cloud:before { content: '\2601'; } /* 2601 */
+.entypo-upload-cloud:before { content: '\e711'; } /* e711 */
+.entypo-bookmark:before { content: '\1f516'; } /* 1f516 */
+.entypo-bookmarks:before { content: '\1f4d1'; } /* 1f4d1 */
+.entypo-play:before { content: '\25b6'; } /* 25b6 */
+.entypo-paus:before { content: '\2389'; } /* 2389 */
+.entypo-record:before { content: '\26ab'; } /* 26ab */
+.entypo-stop:before { content: '\25a0'; } /* 25a0 */
+.entypo-to-end:before { content: '\23ed'; } /* 23ed */
+.entypo-to-start:before { content: '\23ee'; } /* 23ee */
+.entypo-resize-full:before { content: '\e744'; } /* e744 */
+.entypo-resize-small:before { content: '\e746'; } /* e746 */
+.entypo-volume:before { content: '\e742'; } /* e742 */
+.entypo-sound:before { content: '\1f50a'; } /* 1f50a */
+.entypo-mute:before { content: '\1f507'; } /* 1f507 */
+.entypo-flow-cascade:before { content: '\e790'; } /* e790 */
+.entypo-flow-branch:before { content: '\e791'; } /* e791 */
+.entypo-flow-tree:before { content: '\e792'; } /* e792 */
+.entypo-flow-line:before { content: '\e793'; } /* e793 */
+.entypo-flow-parallel:before { content: '\e794'; } /* e794 */
+.entypo-left-bold:before { content: '\e4ad'; } /* e4ad */
+.entypo-right-bold:before { content: '\e4ae'; } /* e4ae */
+.entypo-up-bold:before { content: '\e4af'; } /* e4af */
+.entypo-down-bold:before { content: '\e4b0'; } /* e4b0 */
+.entypo-left:before { content: '\261c'; } /* 261c */
+.entypo-up:before { content: '\261d'; } /* 261d */
+.entypo-right:before { content: '\261e'; } /* 261e */
+.entypo-down:before { content: '\261f'; } /* 261f */
+.entypo-circled-down:before { content: '\e758'; } /* e758 */
+.entypo-circled-left:before { content: '\e759'; } /* e759 */
+.entypo-circled-right:before { content: '\e75a'; } /* e75a */
+.entypo-circled-up:before { content: '\e75b'; } /* e75b */
+.entypo-left-thin:before { content: '\2190'; } /* 2190 */
+.entypo-up-thin:before { content: '\2191'; } /* 2191 */
+.entypo-right-thin:before { content: '\2192'; } /* 2192 */
+.entypo-down-thin:before { content: '\2193'; } /* 2193 */
+.entypo-arrow-combo:before { content: '\e74f'; } /* e74f */
+.entypo-dot:before { content: '\e78b'; } /* e78b */
+.entypo-two-dots:before { content: '\e78c'; } /* e78c */
+.entypo-three-dots:before { content: '\e78d'; } /* e78d */
+.entypo-cc:before { content: '\e7a5'; } /* e7a5 */
+.entypo-cc-by:before { content: '\e7a6'; } /* e7a6 */
+.entypo-cc-nc:before { content: '\e7a7'; } /* e7a7 */
+.entypo-cc-nc-eu:before { content: '\e7a8'; } /* e7a8 */
+.entypo-cc-nc-jp:before { content: '\e7a9'; } /* e7a9 */
+.entypo-cc-sa:before { content: '\e7aa'; } /* e7aa */
+.entypo-cc-nd:before { content: '\e7ab'; } /* e7ab */
+.entypo-cc-pd:before { content: '\e7ac'; } /* e7ac */
+.entypo-cc-zero:before { content: '\e7ad'; } /* e7ad */
+.entypo-cc-share:before { content: '\e7ae'; } /* e7ae */
+.entypo-cc-remix:before { content: '\e7af'; } /* e7af */
+.entypo-db-logo:before { content: '\f603'; } /* f603 */
+.entypo-db-shape:before { content: '\f600'; } /* f600 */
+.entypo-save:before { content: '\1f4be'; } /* 1f4be */
+.entypo-ff:before { content: '\23e9'; } /* 23e9 */
+.entypo-fb:before { content: '\23ea'; } /* 23ea */
+.entypo-pie-chart:before { content: '\e751'; } /* e751 */
+.entypo-line-graph:before { content: '\1f4c8'; } /* 1f4c8 */
+.entypo-bar-graph:before { content: '\1f4ca '; } /* 1f4ca */
+.entypo-area-graph:before { content: '\1f53e'; } /* 1f53e */
+.entypo-chevron-down:before { content: '\e75c'; } /* e75c */
+.entypo-chevron-left:before { content: '\e75d'; } /* e75d */
+.entypo-chevron-right:before { content: '\e75e'; } /* e75e */
+.entypo-chevron-up:before { content: '\e75f'; } /* e75f */
+.entypo-chevron-small-down:before { content: '\e760'; } /* e760 */
+.entypo-chevron-small-left:before { content: '\e761'; } /* e761 */
+.entypo-chevron-small-right:before { content: '\e762'; } /* e762 */
+.entypo-chevron-small-up:before { content: '\e763'; } /* e763 */
+.entypo-chevron-thin-down:before { content: '\e764'; } /* e764 */
+.entypo-chevron-thin-left:before { content: '\e765'; } /* e765 */
+.entypo-chevron-thin-right:before { content: '\e766'; } /* e766 */
+.entypo-chevron-thin-up:before { content: '\e767'; } /* e767 */
+.entypo-text-doc:before { content: '\1f4c4'; } /* 1f4c4 */
+.entypo-open-book:before { content: '\1f4d6'; } /* 1f4d6 */
+.entypo-voicemail:before { content: '\2707'; } /* 2707 */
+.entypo-triangle-right:before { content: '\25b8'; } /* 25b8 */
+.entypo-triangle-up:before { content: '\25b4'; } /* 25b4 */
+.entypo-triangle-down:before { content: '\25be'; } /* 25be */
+.entypo-triangle-left:before { content: '\25c2'; } /* 25c2 */
+.entypo-airplane:before { content: '\2708'; } /* 2708 */
+.entypo-light-bulb:before { content: '\1f4a1'; } /* 1f4a1 */
+.entypo-add-to-list:before { content: '\e003'; } /* e003 */
+.entypo-browser:before { content: '\e74e'; } /* e74e */
+.entypo-cart:before { content: '\e73d'; } /* e73d */
+.entypo-cross-hair:before { content: '\1f3af'; } /* 1f3af */
+.entypo-squared-cross:before { content: '\274e'; } /* 274e */
+.entypo-circled-cross:before { content: '\2716'; } /* 2716 */
+.entypo-warning:before { content: '\26a0'; } /* 26a0 */
+.entypo-cross:before { content: '\2715'; } /* 2715 */
+.entypo-new:before { content: '\1f4a5'; } /* 1f4a5 */
+.entypo-cycle:before { content: '\1f504'; } /* 1f504 */
+.entypo-numbered-list:before { content: '\e005'; } /* e005 */
+.entypo-right-1:before { content: '\27a1'; } /* 27a1 */
+.entypo-left-1:before { content: '\2b05'; } /* 2b05 */
+.entypo-up-1:before { content: '\2b06'; } /* 2b06 */
+.entypo-down-1:before { content: '\2b07'; } /* 2b07 */
+
+/* social extension map */
+.entypo-social-github:before { content: '\f300'; } /* f300 */
+.entypo-social-social-c-github:before { content: '\f301'; } /* f301 */
+.entypo-social-flickr:before { content: '\f303'; } /* f303 */
+.entypo-social-c-flickr:before { content: '\f304'; } /* f304 */
+.entypo-social-vimeo:before { content: '\f306'; } /* f306 */
+.entypo-social-c-vimeo:before { content: '\f307'; } /* f307 */
+.entypo-social-twitter:before { content: '\f309'; } /* f309 */
+.entypo-social-c-twitter:before { content: '\f30a'; } /* f30a */
+.entypo-social-facebook:before { content: '\f30c'; } /* f30c */
+.entypo-social-c-facebook:before { content: '\f30d'; } /* f30d */
+.entypo-social-s-facebook:before { content: '\f30e'; } /* f30e */
+.entypo-social-google-plus:before { content: '\f30f'; } /* f30f */
+.entypo-social-c-google-plus:before { content: '\f310'; } /* f310 */
+.entypo-social-pinterest:before { content: '\f312'; } /* f312 */
+.entypo-social-c-pinterest:before { content: '\f313'; } /* f313 */
+.entypo-social-tumblr:before { content: '\f315'; } /* f315 */
+.entypo-social-c-tumblr:before { content: '\f316'; } /* f316 */
+.entypo-social-linkedin:before { content: '\f318'; } /* f318 */
+.entypo-social-c-linkedin:before { content: '\f319'; } /* f319 */
+.entypo-social-dribbble:before { content: '\f31b'; } /* f31b */
+.entypo-social-c-dribbble:before { content: '\f31c'; } /* f31c */
+.entypo-social-stumbleupon:before { content: '\f31e'; } /* f31e */
+.entypo-social-c-stumbleupon:before { content: '\f31f'; } /* f31f */
+.entypo-social-lastfm:before { content: '\f321'; } /* f321 */
+.entypo-social-c-lastfm:before { content: '\f322'; } /* f322 */
+.entypo-social-rdio:before { content: '\f324'; } /* f324 */
+.entypo-social-c-rdio:before { content: '\f325'; } /* f325 */
+.entypo-social-spotify:before { content: '\f327'; } /* f327 */
+.entypo-social-c-spotify:before { content: '\f328'; } /* f328 */
+.entypo-social-qq:before { content: '\f32a'; } /* f32a */
+.entypo-social-instagram:before { content: '\f32d'; } /* f32d */
+.entypo-social-dropbox:before { content: '\f330'; } /* f330 */
+.entypo-social-evernote:before { content: '\f333'; } /* f333 */
+.entypo-social-flattr:before { content: '\f336'; } /* f336 */
+.entypo-social-skype:before { content: '\f339'; } /* f339 */
+.entypo-social-c-skype:before { content: '\f33a'; } /* f33a */
+.entypo-social-renren:before { content: '\f33c'; } /* f33c */
+.entypo-social-sina-weibo:before { content: '\f33f'; } /* f33f */
+.entypo-social-paypal:before { content: '\f342'; } /* f342 */
+.entypo-social-picasa:before { content: '\f345'; } /* f345 */
+.entypo-social-soundcloud:before { content: '\f348'; } /* f348 */
+.entypo-social-mixi:before { content: '\f34b'; } /* f34b */
+.entypo-social-behance:before { content: '\f34e'; } /* f34e */
+.entypo-social-google-circles:before { content: '\f351'; } /* f351 */
+.entypo-social-vk:before { content: '\f354'; } /* f354 */
+.entypo-social-smashing:before { content: '\f357'; } /* f357 */
diff --git a/vendor/assets/entypo/entypo.woff b/vendor/assets/entypo/entypo.woff
new file mode 100644
index 000000000..06f663814
--- /dev/null
+++ b/vendor/assets/entypo/entypo.woff
Binary files differ