Merge commit '07236016bcc78a82205093b3e067bf4a1bb07d88' into glitch-soc/merge-upstream
This commit is contained in:
commit
659a077616
@ -26,7 +26,7 @@ module ContextHelper
|
||||
memorial: { 'toot' => 'http://joinmastodon.org/ns#', 'memorial' => 'toot:memorial' },
|
||||
voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' },
|
||||
suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' },
|
||||
attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@type' => '@id' } },
|
||||
attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@container' => '@set' } },
|
||||
profile_settings: {
|
||||
'toot' => 'http://joinmastodon.org/ns#',
|
||||
'showFeatured' => 'toot:showFeatured',
|
||||
|
||||
@ -168,7 +168,7 @@ class About extends PureComponent {
|
||||
<LinkFooter context='about' />
|
||||
|
||||
<div className='about__footer'>
|
||||
<p><FormattedMessage id='about.disclaimer' defaultMessage='Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.' /></p>
|
||||
<p><FormattedMessage id='about.disclaimer' defaultMessage='Mastodon is free, open-source software, and a trademark of Mastodon GmbH.' /></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"about.blocks": "Moderated servers",
|
||||
"about.contact": "Contact:",
|
||||
"about.default_locale": "Default",
|
||||
"about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.",
|
||||
"about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon GmbH.",
|
||||
"about.domain_blocks.no_reason_available": "Reason not available",
|
||||
"about.domain_blocks.preamble": "Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.",
|
||||
"about.domain_blocks.silenced.explanation": "You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.",
|
||||
|
||||
@ -150,7 +150,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
@account.show_featured = @json['showFeatured'] if @json.key?('showFeatured')
|
||||
@account.show_media = @json['showMedia'] if @json.key?('showMedia')
|
||||
@account.show_media_replies = @json['showRepliesInMedia'] if @json.key?('showRepliesInMedia')
|
||||
@account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).map { |item| value_or_id(item) }
|
||||
@account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).filter { |item| item.is_a?(String) }
|
||||
end
|
||||
|
||||
def set_fetchable_key!
|
||||
|
||||
@ -4,7 +4,7 @@ These terms of service (the "Terms") cover your access and use of Server
|
||||
Operator's ("Administrator", "we", or "us") instance, located at %{domain} (the
|
||||
"Instance"). These Terms apply solely to your use of the Instance as operated
|
||||
by the Administrator. Please note that we have no affiliation with Mastodon
|
||||
gGmbH (“Mastodon”) and these Terms do not contain any representations or
|
||||
GmbH (“Mastodon”) and these Terms do not contain any representations or
|
||||
warranties or other promises from Mastodon about your use of the Instance. If
|
||||
you would like to contact us for any reason, please direct all questions,
|
||||
comments, concerns and notices to us by following the instructions provided in
|
||||
|
||||
@ -93,8 +93,10 @@ class Sanitize
|
||||
# next, we find the plain-text description
|
||||
is_annotation_with_encoding = lambda do |encoding, node|
|
||||
return false unless node.name == 'annotation'
|
||||
encoding_attr = node.attributes['encoding']
|
||||
return false if encoding_attr.nil?
|
||||
|
||||
node.attributes['encoding'].value == encoding
|
||||
encoding_attr.value == encoding
|
||||
end
|
||||
|
||||
annotation = semantics.children.find(&is_annotation_with_encoding.curry['application/x-tex'])
|
||||
|
||||
@ -36,6 +36,14 @@ RSpec.describe Sanitize::Config do
|
||||
expect(Sanitize.fragment('<a href="foo://bar">Test<a href="https://example.com">test</a></a>', subject)).to eq 'Test<a href="https://example.com">test</a>'
|
||||
end
|
||||
|
||||
it 'removes math when unparsable due to missing attributes' do
|
||||
expect(Sanitize.fragment('<math><semantics><annotation>x</annotation></semantics></math>', subject)).to eq ''
|
||||
end
|
||||
|
||||
it 'removes math when unparsable due to missing encoding attribute' do
|
||||
expect(Sanitize.fragment('<math><semantics><annotation class="foo">x</annotation></semantics></math>', subject)).to eq ''
|
||||
end
|
||||
|
||||
it 'keeps a with href' do
|
||||
expect(Sanitize.fragment('<a href="http://example.com">Test</a>', subject)).to eq '<a href="http://example.com" rel="nofollow noopener" target="_blank">Test</a>'
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user