Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

New lines in content type TXT #2

cookie-at-zeno-pl opened this Issue Aug 16, 2011 · 0 comments


None yet
1 participant

Hello. :)

An output given by OPT parses has new lines replaced to spaces. It's ok in HTML templates, but is not in text/plain content type. Also, parser ignores special chars "\n" - they are treated as simple string.

I use text templates for text/plain emails body and there's no solution for get multi-line output without ugly workarounds in PHP like:

$mailText = $mailView->fetch(); // its my view object, it uses Opt_Output_Return to return parsed template
$mailText = str_replace('\n', "\n", $mailText);

to replace '\n' inserted manually in template file to special chars.

Note, that for TXT templates I use QUIRKS_MODE and Opt_Output_Return

TIA for answer. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment