Subject: | Documentation for "Remove last newline from $entity->head->get('Subject')" |
ON Bug#26087 MARKOV wrote:
Show quoted text
> The removal of \n\s+ from the header field content is the removal of
> field folding, as desribed in the RFC. Folding can appear unexpectedly,
> introduced by mail transfer agents, and is therefore automatically
> removed.
>
> Actually, unfolding should only remove \n\s (without a \s*), but that's
> an historical mistake, which I cannot repair without breaking existing
> applications. For the same reason, I cannot remove the \n after the
> field content when it is returned: it will break existing code, and it
> is not worth that.
>
> If you want code which is RFC compliant and which does chomp for you,
> use MailBox, not MailTools.
Could you include exactly what you said in the $entity->head->get()
documentation so nobody has to ask for it again?