Merge branch 'asonix/changes' into v4.0.0-branch

This commit is contained in:
asonix 2022-11-14 15:18:19 -06:00
commit 22ec78b226
77 changed files with 19058 additions and 29 deletions

View file

@ -21,7 +21,7 @@ module Mastodon
end
def suffix
''
'-asonix-changes'
end
def to_a
@ -33,11 +33,11 @@ module Mastodon
end
def repository
ENV.fetch('GITHUB_REPOSITORY', 'mastodon/mastodon')
ENV.fetch('GITHUB_REPOSITORY', 'asonix/mastodon')
end
def source_base_url
ENV.fetch('SOURCE_BASE_URL', "https://github.com/#{repository}")
ENV.fetch('SOURCE_BASE_URL', "https://git.asonix.dog/#{repository}")
end
# specify git tag or commit hash here

View file

@ -71,11 +71,13 @@ class Sanitize
end
MASTODON_STRICT ||= freeze_config(
elements: %w(p br span a),
elements: %w(p br span a abbr del pre blockquote code b strong u sub i em h1 h2 h3 h4 h5 ul ol li),
attributes: {
'a' => %w(href rel class),
'span' => %w(class),
'a' => %w(href rel class title),
'span' => %w(class),
'abbr' => %w(title),
'blockquote' => %w(cite),
},
add_attributes: {
@ -85,7 +87,10 @@ class Sanitize
},
},
protocols: {},
protocols: {
'a' => { 'href' => HTTP_PROTOCOLS },
'blockquote' => { 'cite' => HTTP_PROTOCOLS },
},
transformers: [
CLASS_WHITELIST_TRANSFORMER,