Announcement

Collapse
No announcement yet.

Line breaks disappearing when rendering a template as plain text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Line breaks disappearing when rendering a template as plain text

    Hi folks,

    I'm writing a module that sends emails when certain events happen, and I'm setting up a template so that the client can edit the email himself. The template is being rendered by a call to TemplateManager_Render_Page enclosed by an MvCAPTURE, in the usual way. In this case, I'm trying to generate a plain-text email, and most of my line breaks are getting thrown away. The text should be spread out in multiple paragraphs with blank lines in between. But the emails are showing up in my In box with many of the paragraphs mushed together. Not all of them, but I can't figure out the pattern of why some line breaks are lost while others are prerved. Any ideas on what's causing this? I tried adding a Content-Type: text/plain header, but that didn't seem to help.

    Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    #2
    Kent

    In your template try adding this to the top of the page.

    Code:
    <mvt:miva output="on" compresswhitespace="off" />
    http://www.mivascript.com/item/miva_...e_compile.html

    mvt:miva This was added a few versions ago.
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton

    Comment

    Working...
    X