Content parsing

This commit is contained in:
2024-02-24 15:15:06 +11:00
parent 12ad1666a2
commit da9209c1ce

View File

@@ -53,7 +53,7 @@ module Micropub
new_params = if req_type == :json
content = if params[:properties][:content]
if params[:properties][:content].is_a?(Array) && params[:properties][:content].first[:html]
if params[:properties][:content].is_a?(Array) && params[:properties][:content].first.is_a?(Hash)
params[:properties][:content].first[:html]
else
params[:properties][:content].first&.tr("\n", " ")