{"id":19017613,"date":"2026-09-11T11:46:06","date_gmt":"2026-09-11T11:46:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/feature-request-json-escape-filter-for-variables-or-a-transform-step\/"},"modified":"2026-09-11T11:46:06","modified_gmt":"2026-09-11T11:46:06","slug":"feature-request-json-escape-filter-for-variables-or-a-transform-step","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/feature-request-json-escape-filter-for-variables-or-a-transform-step\/","title":{"rendered":"Feature request: JSON-escape filter for variables (or a Transform step)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Hi!<\/strong><br \/>Me again&#8230; I&#8217;ve hit one thing I can&#8217;t solve with the steps currently available, and I wanted to ask if it&#8217;s something you&#8217;d consider adding.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The problem:<\/strong>&nbsp;I&#8217;m passing a large scraped text blob (Firecrawl markdown, roughly 20,000 characters) into the body of an HTTP Request step. The body is JSON. The markdown contains double quotes, backslashes, and newlines \u2014 which break the JSON string it&#8217;s embedded in, and the request fails before it&#8217;s even sent (&#8220;failed to fetch&#8221;). I can only pass short, clean values right now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What would solve it<\/strong>&nbsp;\u2014 either of these, whichever fits the plugin better:<\/p>\n\n\n\n<ol start=\"1\">\n<li><strong>A variable filter<\/strong>\u00a0\u2014 so when you insert a variable via the {} data picker, you could optionally apply something like\u00a0<code>{{ firecrawl.json.data.markdown | json_escape }}<\/code>. That filter would escape\u00a0<code>\"<\/code>\u00a0\u2192\u00a0<code>\\\"<\/code>,\u00a0<code>\\<\/code>\u00a0\u2192\u00a0<code>\\\\<\/code>, and newlines \u2192\u00a0<code>\\n<\/code>, making the value safe inside a JSON string.<\/li>\n\n\n\n<li><strong>A Transform step<\/strong>\u00a0\u2014 a small step that takes an input value, applies a chosen transformation (JSON escape \/ URL encode \/ truncate to N chars), and outputs the result to a new variable later steps can reference.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The first would be my preference if it&#8217;s not too much bother, since it keeps the workflow diagram tidy \u2014 but honestly either would work, and I&#8217;d trust your judgement on which fits better with how Meow is designed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The workflow it&#8217;s for, in case it helps:<\/strong><br \/>Webhook \u2192 Firecrawl (scrape page) \u2192 Gemini (write article from scraped content) \u2192 Create Post (WordPress draft).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s all working right now when I pass a short value \u2014 I&#8217;ve just hit the length\/escaping wall with the full scraped page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks again for building it \u2014 genuinely appreciate the work.<\/p>\n","protected":false},"template":"","class_list":["post-19017613","topic","type-topic","status-publish","hentry","topic-tag-feature-request","topic-tag-http-request","topic-tag-variables"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19017613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19017613\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19017613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}