mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add href and target attributes to product serializer sanitizer to allow links with target in product descriptions
This commit is contained in:
@@ -55,7 +55,7 @@ class Api::CachedProductSerializer < ActiveModel::Serializer
|
||||
|
||||
#return a sanitized html description
|
||||
def description_html
|
||||
d = sanitize(object.description, tags: "p, b, strong, em, i, a, u")
|
||||
d = sanitize(object.description, tags: "p, b, strong, em, i, a, u", attributes: "href, target")
|
||||
d.to_s.html_safe
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user