From 450e5cc5e366b413ce8fcaa35cf984c012ed5be1 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 17 Sep 2020 14:33:47 +1000 Subject: [PATCH] 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. --- app/serializers/api/product_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/api/product_serializer.rb b/app/serializers/api/product_serializer.rb index 733904c5b6..9223a797d8 100644 --- a/app/serializers/api/product_serializer.rb +++ b/app/serializers/api/product_serializer.rb @@ -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