dmail_notice.html.erb: use absolute urls in dtext links.

This commit is contained in:
evazion
2017-02-18 03:06:28 -06:00
parent d78c537ec2
commit 17d4feaf15
2 changed files with 6 additions and 6 deletions

View File

@@ -49,9 +49,9 @@ module ApplicationHelper
raw %{<a href="#{h(url)}" #{attributes}>#{text}</a>}
end
def format_text(text, options = {})
if options[:ragel]
raw(DTextRagel.parse(text))
def format_text(text, ragel: true, **options)
if ragel
raw DTextRagel.parse(text, **options)
else
DText.parse(text)
end

View File

@@ -1,10 +1,10 @@
<!doctype html>
<html>
<body>
<p><%= h @dmail.from.name %> said:</p>
<p><%= @dmail.from.name %> said:</p>
<div>
<%= DText.parse(@dmail.body) %>
<div class="prose">
<%= format_text(@dmail.body, base_url: root_url) %>
</div>
<p><%= link_to "View message", dmail_url(@dmail, :host => Danbooru.config.hostname, :only_path => false) %> | <%= link_to "Unsubscribe", maintenance_user_email_notification_url(:user_id => @dmail.owner.id, :sig => email_sig(@dmail.owner), :host => Danbooru.config.hostname, :only_path => false) %></p>