Remove indent of product description on iPhone

Our HTML formatting plugin for product descriptions adds whitespace to
the beginning of the description text. While that shouldn't be rendered
in HTML, Safari on iPhone was showing a whitespace and therefore moving
the text a bit to the right.
This commit is contained in:
Maikel Linke
2020-09-17 14:33:47 +10:00
parent 36ead3fdba
commit 450e5cc5e3

View File

@@ -18,7 +18,7 @@ class Api::ProductSerializer < ActiveModel::Serializer
# return an unformatted descripton
def description
strip_tags object.description
strip_tags object.description&.strip
end
# return a sanitized html description