Line breaks disappearing when rendering a template as plain text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kent Multer
    Mega Mivite









    • Mar 2006
    • 3254

    #1

    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
  • RayYates
    Developer Partner



    • Dec 2006
    • 1517

    #2
    Kent

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

    Code:
    <mvt:miva output="on" compresswhitespace="off" />
    Miva Script is a server side web scripting language is especially well suited for development of web applications having built in support for SQL and xBase3 databases.


    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