Fix: %を含む利用規約やプライバシーポリシーを設定した場合、REST APIからの取得ができなくなる問題 (#972)

This commit is contained in:
KMY(雪あすか) 2025-01-25 09:58:09 +09:00 committed by GitHub
parent 811f09e46b
commit fa7b967777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ class REST::PrivacyPolicySerializer < ActiveModel::Serializer
end
def content
markdown.render(format(object.text, domain: Rails.configuration.x.local_domain))
markdown.render(object.text.gsub(/%{domain}/, Rails.configuration.x.local_domain))
end
private