diff --git a/layouts/_default/single.activity.ajson b/layouts/_default/single.activity.ajson index e90a8fe..4e0a1e3 100644 --- a/layouts/_default/single.activity.ajson +++ b/layouts/_default/single.activity.ajson @@ -12,7 +12,7 @@ {{- else -}} "type": "Note", {{ end -}} - "content": {{ ((htmlUnescape .Content | safeHTML) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }}, + "content": {{ partial "cleanedContent.json" . }}, {{- if .Params.images }} "attachment": [ {{ $delimiter := "" -}} diff --git a/layouts/partial/cleanedContent.json b/layouts/partial/cleanedContent.json new file mode 100644 index 0000000..8653b9a --- /dev/null +++ b/layouts/partial/cleanedContent.json @@ -0,0 +1 @@ +{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }} \ No newline at end of file