diff options
author | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-01-08 04:17:11 +0000 |
---|---|---|
committer | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-01-08 04:17:11 +0000 |
commit | 722b3f567f18ae31b05f320441c73279b4f5ad11 (patch) | |
tree | 8e009982fa512566ce7172c8b4fe610be38d5c39 /app/helpers | |
parent | f7c4d4464ba3b3729d707c54c4d2aa7515a9fe57 (diff) | |
parent | e4a241abefaa68492938c3fbb7e5e5401d12138e (diff) |
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/jsonld_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/jsonld_helper.rb b/app/helpers/jsonld_helper.rb index 6c7c38070..9530ad9f3 100644 --- a/app/helpers/jsonld_helper.rb +++ b/app/helpers/jsonld_helper.rb @@ -39,6 +39,10 @@ module JsonLdHelper !json.nil? && equals_or_includes?(json['@context'], ActivityPub::TagManager::CONTEXT) end + def unsupported_uri_scheme?(uri) + !uri.start_with?('http://', 'https://') + end + def canonicalize(json) graph = RDF::Graph.new << JSON::LD::API.toRdf(json) graph.dump(:normalize) |