I have this in a template:
{% import "_helpers/macros" as macros %}
{% set redirectUrl = macros.testRelatedReview(entry) %}
{% redirect redirectUrl 301 %}
The macro returns an entry URL.
But the page returns an error:
Header may not contain more than a single header, new line detected
If I change it to {% redirect 'actual_value_of_redirectUrl' 301 %}
, it redirects OK.
How do I get it to work with the dynamic variable though?